Imported Upstream version 0.1.8
authorMatteo F. Vescovi <mfv.debian@gmail.com>
Sat, 31 Mar 2012 09:37:02 +0000 (11:37 +0200)
committerMatteo F. Vescovi <mfv.debian@gmail.com>
Sat, 31 Mar 2012 09:37:02 +0000 (11:37 +0200)
61 files changed:
ChangeLog
INSTALL
Makefile.am
Makefile.in
NEWS
README
aclocal.m4
babl/Babl-0.1.gir [deleted file]
babl/Makefile.am
babl/Makefile.in
babl/babl-class.h
babl/babl-component.c
babl/babl-conversion.c
babl/babl-conversion.h
babl/babl-extension.h
babl/babl-fish-path.c
babl/babl-fish-reference.c
babl/babl-fish-stats.c
babl/babl-fish.c
babl/babl-format.c
babl/babl-format.h
babl/babl-image.c
babl/babl-image.h
babl/babl-internal.h
babl/babl-model.c
babl/babl-model.h
babl/babl-palette.c [new file with mode: 0644]
babl/babl-sampling.c
babl/babl-type.c
babl/babl-types.h
babl/babl-version.h
babl/babl.h
babl/base/Makefile.in
babl/base/babl-base.h
config.guess
config.sub
configure
configure.ac
depcomp
docs/Makefile.in
docs/graphics/Makefile.in
extensions/Makefile.am
extensions/Makefile.in
extensions/cairo.c [new file with mode: 0644]
extensions/gegl-fixups.c
extensions/gggl-lies.c
extensions/gggl.c
extensions/gimp-8bit.c
extensions/sse-fixups.c
install-sh
m4/introspection.m4
missing
tests/Makefile.am
tests/Makefile.in
tests/concurrency-stress-test.c
tests/extract.c [new file with mode: 0644]
tests/grayscale_to_rgb.c
tests/n_components.c
tests/palette.c [new file with mode: 0644]
tests/rgb_to_bgr.c
tests/rgb_to_ycbcr.c

index 4d6c021a39143f13ce35c5da3b568d623ec45119..cd1fe8340bf67ccd0e804925cb25f9309beb7652 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,368 @@
+commit 21d823b676c7785bf555f913d5cc04ff0fca3e8b
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Mar 30 00:33:09 2012 +0100
+
+    bump version to 0.1.8
+
+    Also updated NEWS
+
+ NEWS         |    4 ++++
+ configure.ac |    2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 45c58bae85cce261ab585d4277bcf1143a922d75
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Mar 30 00:31:43 2012 +0100
+
+    build: do not enable introspection even for distcheck
+
+ Makefile.am |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 803de20d07e11c76ca928502d519ddaf5ffd5c59
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Mar 30 00:14:49 2012 +0100
+
+    palette: return the same values if same name is provided
+
+ babl/babl-palette.c |   15 +++++++++++++--
+ babl/babl.h         |    4 +++-
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+commit 8a220e393495137c0595c11602e1ea69c3962cc2
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Wed Mar 28 20:28:48 2012 +0100
+
+    palette: change alpha reporting for palette formats
+
+    Only return TRUE if the format has a dedicated alpha component.
+
+ babl/babl-palette.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 56e8871e416659463ecd48c954e735a35fa84b92
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Mon Mar 26 15:29:12 2012 +0100
+
+    palette: use INT_MAX instead of MAXINT
+
+ babl/babl-palette.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2e301fd87651f325a3684fe0cc23acd2ac67bc6a
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Wed Mar 21 18:13:38 2012 +0000
+
+    add babl_format_is_palette
+
+ babl/babl-format.h  |    1 +
+ babl/babl-palette.c |   23 +++++++++++++++++------
+ babl/babl.h         |   12 ++++++++++--
+ 3 files changed, 28 insertions(+), 8 deletions(-)
+
+commit a8101cab0f51d2b1aa486b3723f5f5606645a9d6
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Mon Mar 19 15:24:36 2012 +0000
+
+    palette: return the BablModel created
+
+ babl/babl-palette.c |    8 +++++---
+ babl/babl.h         |    8 +++++---
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+commit d5489f961a89baf74c622c8312589d420fb96c51
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Mon Mar 19 12:46:45 2012 +0000
+
+    disable gobject introspection by default
+
+    The tooling crashes with odd strlen assertions breaking the build
+    on many
+    existing linux distros. This change should make gobject introspection
+    disabled by defualt.
+
+ m4/introspection.m4 |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3246212471a8841e2c9de2ea50904749727f3dbc
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Mon Mar 19 02:55:32 2012 +0000
+
+    palette: optimize rgb(a) -> palette index computation
+
+ babl/babl-palette.c |  261
+ +++++++++++++++++++++++++++++++++++++++++----------
+ 1 files changed, 210 insertions(+), 51 deletions(-)
+
+commit fde6f74ee6df6da8637b55ba0a8187e4c17c8138
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 22:10:20 2012 +0000
+
+    palette: add fast paths for adding and removing alpha channel
+
+ babl/babl-palette.c |   73
+ ++++++++++++++++++++++----------------------------
+ 1 files changed, 32 insertions(+), 41 deletions(-)
+
+commit e803b072f06e2e2717fd2be0df4b3c5f058cf6ca
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 16:57:04 2012 +0000
+
+    tests: constify tests
+
+ tests/concurrency-stress-test.c |    2 +-
+ tests/extract.c                 |    2 +-
+ tests/grayscale_to_rgb.c        |    2 +-
+ tests/n_components.c            |    6 +++---
+ tests/palette.c                 |    6 +++---
+ tests/rgb_to_bgr.c              |    2 +-
+ tests/rgb_to_ycbcr.c            |    2 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+commit afd9b27918e766858724b25ce427af66ed46db2b
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 15:58:11 2012 +0000
+
+    constify API
+
+ babl/babl-class.h          |   10 +++---
+ babl/babl-component.c      |    2 +-
+ babl/babl-conversion.c     |   24 +++++++-------
+ babl/babl-conversion.h     |    4 +--
+ babl/babl-extension.h      |    4 +-
+ babl/babl-fish-path.c      |   11 +++---
+ babl/babl-fish-reference.c |    8 ++--
+ babl/babl-fish-stats.c     |    8 ++--
+ babl/babl-fish.c           |    2 +-
+ babl/babl-format.c         |   75
+ ++++++++++++++++++++++---------------------
+ babl/babl-image.c          |    7 ++--
+ babl/babl-image.h          |    2 +-
+ babl/babl-internal.h       |   22 ++++++------
+ babl/babl-model.c          |   23 +++++++------
+ babl/babl-palette.c        |   24 +++++++-------
+ babl/babl-sampling.c       |    2 +-
+ babl/babl-type.c           |   19 ++++++-----
+ babl/babl.h                |   52 +++++++++++++++---------------
+ extensions/gegl-fixups.c   |   14 ++++----
+ extensions/gggl-lies.c     |   44 +++++++++++++-------------
+ extensions/gggl.c          |   42 ++++++++++++------------
+ extensions/gimp-8bit.c     |   26 +++++++-------
+ extensions/sse-fixups.c    |    6 ++--
+ 23 files changed, 218 insertions(+), 213 deletions(-)
+
+commit a305fd91ced781f86ed05732a3cac9fb77e5902d
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 15:00:07 2012 +0000
+
+    palette: add fastish path for alpha<->no alpha
+
+ babl/babl-palette.c |   58
+ ++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 53 insertions(+), 5 deletions(-)
+
+commit fc2c0afa0f26a970cfdee28511a676e392415fd9
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 14:17:04 2012 +0000
+
+    carry around user data in BablConversion
+
+    Having the user data for relevant conversions directly in
+    BablConversion
+    permits avoiding branches in the dispatch code. Branches in dispatch
+    code
+    is evil, thus desinging the rest around avoiding that.
+
+ babl/babl-conversion.c |   38 ++++++++++++++++----------------------
+ babl/babl-conversion.h |    4 ++--
+ babl/babl-palette.c    |   22 ++++++++++++----------
+ babl/babl-types.h      |    6 ++----
+ 4 files changed, 32 insertions(+), 38 deletions(-)
+
+commit 23345ce49c8ba6c6d185a788da90ff3c8c9a077e
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 13:10:19 2012 +0000
+
+    palette: changed API to have aplha and non-alpha formats in out
+    arguments
+
+ babl/babl-palette.c |   23 ++++++++---------------
+ 1 files changed, 8 insertions(+), 15 deletions(-)
+
+commit 435e8ff0d2db7ac7405cabdd7dc25e950f2af632
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 11:39:12 2012 +0000
+
+    make babl pass valgrinding
+
+ babl/babl-conversion.c |   18 ++++-
+ babl/babl-format.c     |   25 ++++++-
+ babl/babl-format.h     |    7 +--
+ babl/babl-palette.c    |  185
+ ++++++++++++++++++++++++++++--------------------
+ babl/babl.h            |    3 +-
+ tests/palette.c        |   27 ++++++-
+ 6 files changed, 173 insertions(+), 92 deletions(-)
+
+commit 5945aea4b04d90274e263731cde180bf4d3fafd9
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 02:52:00 2012 +0000
+
+    palette: initialize with 8bit fast path buffer
+
+ babl/babl-palette.c |    4 +++-
+ tests/palette.c     |   33 +++++++++++++++++++++++++++------
+ 2 files changed, 30 insertions(+), 7 deletions(-)
+
+commit f28a81b51feb50e36b099dc1b0efa3687c188688
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sun Mar 18 00:10:52 2012 +0000
+
+    add 8bit fast path for pal -> rgba
+
+ babl/babl-palette.c |   42 +++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 41 insertions(+), 1 deletions(-)
+
+commit 9e4542ca2b6322c56bc1dc8aa26d091bc5a4a158
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 23:54:49 2012 +0000
+
+    add bablformats that match the hosts endianness
+
+ extensions/Makefile.am |    2 +
+ extensions/cairo.c     |   86
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 88 insertions(+), 0 deletions(-)
+
+commit 72add8f22426f0f7457e9eebffe0a458e42d4b0b
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 19:39:21 2012 +0000
+
+    palette: cache the double version of the palette internally
+
+ babl/babl-palette.c |   74
+ ++++++++++++++++++++-------------------------------
+ 1 files changed, 29 insertions(+), 45 deletions(-)
+
+commit 9d2aa7d13ac421935de1e87301c48af50b0ceb59
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 17:02:44 2012 +0000
+
+    palette: add capability to use palette formats with separate alpha
+
+    Also refactored to make babl-palette.c only use public API.
+
+ babl/babl-fish-path.c |    6 +-
+ babl/babl-format.c    |   14 +++
+ babl/babl-ids.h       |    1 -
+ babl/babl-palette.c   |  226
+ +++++++++++++++++++++++++++++++++++--------------
+ babl/babl.h           |   18 ++++-
+ tests/palette.c       |   39 ++++++++-
+ 6 files changed, 230 insertions(+), 74 deletions(-)
+
+commit 11d4a44ebbee10d62064b516e8946025ea045f76
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 12:32:47 2012 +0000
+
+    add file missing from last commit
+
+ babl/babl-palette.c |  254
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 254 insertions(+), 0 deletions(-)
+
+commit 47f3c99e1c58bb50e60d03727c2b2cdcef363cbf
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 12:22:10 2012 +0000
+
+    add API for managing palette based formats
+
+ babl/Makefile.am      |    1 +
+ babl/babl-ids.h       |    1 +
+ babl/babl-types.h     |    8 +++-
+ babl/babl.h           |   21 +++++++++
+ babl/base/babl-base.h |    1 +
+ tests/Makefile.am     |    3 +-
+ tests/palette.c       |  108
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 139 insertions(+), 4 deletions(-)
+
+commit ba6d0f554ecb85c853135ada91bc049b28448da9
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Sat Mar 17 12:18:54 2012 +0000
+
+    babl: add ability to register user data with BablModel
+
+    The user data is available in the callback functions, no ABI
+    change only
+    processing functions interested in this data needs to define the
+    arguments,..
+    keeping ABI compatibility.
+
+ babl/babl-conversion.c |   12 +++++++++---
+ babl/babl-conversion.h |    4 +++-
+ babl/babl-fish-path.c  |    4 ++++
+ babl/babl-format.h     |    4 ++++
+ babl/babl-internal.h   |    1 +
+ babl/babl-model.c      |    4 ++--
+ babl/babl-model.h      |    1 +
+ 7 files changed, 24 insertions(+), 6 deletions(-)
+
+commit f5b934ff75b786c22d8d885dc489e231031b6c23
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Mar 16 11:53:45 2012 +0000
+
+    tests: add missing test
+
+ tests/extract.c |  144
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 144 insertions(+), 0 deletions(-)
+
+commit ba69dcba43d31279bcc27076fb15859e5ad520c9
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Mar 16 11:25:59 2012 +0000
+
+    add ability to extract component with 1 component formats
+
+ babl/babl-format.c |    4 +++-
+ tests/Makefile.am  |    3 +++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 5f21288bd2d011894bf139728eb3a185bcc6f4c1
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Thu Mar 15 22:11:56 2012 +0000
+
+    constify source argument of babl_process
+
+ babl/babl-conversion.c     |   18 ++++++++--------
+ babl/babl-conversion.h     |   10 ++++----
+ babl/babl-fish-path.c      |   47
+ +++++++++++++++++++++----------------------
+ babl/babl-fish-reference.c |   36 ++++++++++++++++----------------
+ babl/babl-internal.h       |    4 +-
+ babl/babl-types.h          |    4 +-
+ babl/babl.h                |    2 +-
+ 7 files changed, 60 insertions(+), 61 deletions(-)
+
+commit b76b220b8ede1c3048c18c6abbaf384604ac8012
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Dec 23 11:44:14 2011 +0000
+
+    base: remove unused model-cmyk
+
+ babl/base/model-cmyk.c |  213
+ ------------------------------------------------
+ 1 files changed, 0 insertions(+), 213 deletions(-)
+
+commit 9cabedb56d5ae9803e34bb79041d87c90400c1dd
+Author: Øyvind Kolås <pippin@gimp.org>
+Date:   Fri Nov 18 18:47:02 2011 +0000
+
+    post release version bump to 0.1.7
+
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
 commit 180becb47465ca34bd4ba68c2737bef0c06ad284
 Author: Øyvind Kolås <pippin@gimp.org>
 Date:   Fri Nov 18 18:44:58 2011 +0000
@@ -729,13 +1094,13 @@ Date:   Mon Jun 28 00:42:02 2010 +0100
     formats with the same number of components.
 
  babl/babl-classes.h        |    2 +-
- babl/babl-fish-reference.c |  135
- ++++++++++++++++++++++++++++++++++++++------
+ babl/babl-fish-reference.c |  131
+ +++++++++++++++++++++++++++++++++++++++-----
  babl/babl-format.c         |   56 +++++++++++++++++-
  babl/babl.h                |   12 ++++-
  tests/Makefile.am          |    1 +
- tests/n_components.c       |  116 +++++++++++++++++++++++++++++++++++++
- 6 files changed, 299 insertions(+), 23 deletions(-)
+ tests/n_components.c       |  116 +++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 297 insertions(+), 21 deletions(-)
 
 commit ec2bbd3f89f7cef65edd15d6d8fa516259714241
 Author: Øyvind Kolås <pippin@gimp.org>
diff --git a/INSTALL b/INSTALL
index 482bf0b87d16928fbb19afe9fd5a4c174573f41b..5212bd47dfd372bf516d8d98a3e1b3c2555fdde6 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-babl 0.1.6
+babl 0.1.8
 
     Dynamic; any to any, pixel format conversion library.
 
@@ -12,10 +12,10 @@ From a released version the following is the expected method of
 installation (or a variation on this theme):
 
      ------------------------------------------------------------
-     foo$ wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.6.tar.bz2
-     foo$ tar jxf babl-0.1.6.tar.gz
-     foo$ cd babl-0.1.6
-     foo/babl-0.1.6$ ./configure && make && sudo make install
+     foo$ wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.8.tar.bz2
+     foo$ tar jxf babl-0.1.8.tar.gz
+     foo$ cd babl-0.1.8
+     foo/babl-0.1.8$ ./configure && make && sudo make install
      ------------------------------------------------------------
 
 
index f3da0985f5f7f35cd18888ebf698576243b413b3..840872ef38e5cdd5b9ca453e312ff70d8337dae5 100644 (file)
@@ -1,5 +1,5 @@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+#DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
 
 SUBDIRS = \
        babl            \
index b33158d4f5c50e4c86075b230f8b85bb24d395df..dc9d63ef791b2772f70985a460bd9f7579aaf27a 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -55,11 +55,11 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = babl.pc INSTALL
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
@@ -91,6 +91,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
 DATA = $(pkgconfig_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
@@ -105,9 +111,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -136,6 +144,8 @@ am__relativize = \
 GZIP_ENV = --best
 DIST_ARCHIVES = $(distdir).tar.bz2
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@
@@ -289,7 +299,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+#DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
 SUBDIRS = \
        babl            \
        extensions      \
@@ -323,7 +333,7 @@ all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 .SUFFIXES:
-am--refresh:
+am--refresh: Makefile
        @:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
@@ -359,10 +369,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-       @if test ! -f $@; then \
-         rm -f stamp-h1; \
-         $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-       else :; fi
+       @if test ! -f $@; then rm -f stamp-h1; else :; fi
+       @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
        @rm -f stamp-h1
@@ -404,9 +412,7 @@ uninstall-pkgconfigDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+       dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -614,7 +620,11 @@ dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
        $(am__remove_distdir)
 dist-bzip2: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
        $(am__remove_distdir)
 
 dist-lzma: distdir
@@ -622,7 +632,7 @@ dist-lzma: distdir
        $(am__remove_distdir)
 
 dist-xz: distdir
-       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
        $(am__remove_distdir)
 
 dist-tarZ: distdir
@@ -639,7 +649,7 @@ dist-zip: distdir
        $(am__remove_distdir)
 
 dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
        $(am__remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
@@ -653,6 +663,8 @@ distcheck: dist
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
@@ -672,6 +684,7 @@ distcheck: dist
          && am__cwd=`pwd` \
          && $(am__cd) $(distdir)/_build \
          && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -700,8 +713,16 @@ distcheck: dist
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
@@ -735,10 +756,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
@@ -827,8 +853,8 @@ uninstall-am: uninstall-pkgconfigDATA
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-generic \
        clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
-       dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-       distcheck distclean distclean-generic distclean-hdr \
+       dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
+       dist-zip distcheck distclean distclean-generic distclean-hdr \
        distclean-libtool distclean-local distclean-tags \
        distcleancheck distdir distuninstallcheck dvi dvi-am html \
        html-am info info-am install install-am install-data \
diff --git a/NEWS b/NEWS
index f8f8c54c13e7857afcde6bbe0e1f5994c3c72a59..506c2f16d017f7630d7231bffbb90bf15a3e0c31 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,10 @@ the news section both in the README and the webpage.
 
                                                                           -->
 
+
+2012-03-30 babl-0.1.8                                               </dt><dd>
+Added support for indexed/pallette based formats, constified API.
+                                                                    </dd><dt>
 2011-11-18 babl-0.1.6                                               </dt><dd>
 Build improvements, remove blatantly wrong conversions from extensions,
 made it possible to distinguish format_n formats from others, improvements
diff --git a/README b/README
index 70e2abaa470c92dd9b2f175fb9cf160ced870fe3..b205cb927046c5f7ddff9b989bcc18f25abe2b9d 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Babl-0.1.6
+Babl-0.1.8
 
 Contents
 
@@ -59,6 +59,8 @@ babl release. If there are significant improvements to babl when a GEGL
 release is done a babl release is most often put out just prior to the
 GEGL release.
 
+2012-03-30 babl-0.1.8
+    Added support for indexed/pallette based formats, constified API.
 2011-11-18 babl-0.1.6
     Build improvements, remove blatantly wrong conversions from
     extensions, made it possible to distinguish format_n formats from
@@ -1143,6 +1145,42 @@ components
     float CIE H(ab)
     float A
 
+cairo-ARGB32
+
+bytes/pixel
+    4
+model
+    R'aG'aB'aA
+components
+
+    u8 B'a
+    u8 G'a
+    u8 R'a
+    u8 A
+
+cairo-RGB24
+
+bytes/pixel
+    4
+model
+    R'G'B'
+components
+
+    u8 B'
+    u8 G'
+    u8 R'
+    u8 PAD
+
+cairo-A8
+
+bytes/pixel
+    1
+model
+    YA
+components
+
+    u8  A
+
 CMYK double
 
 bytes/pixel
@@ -1203,78 +1241,81 @@ height of the bar indicates the number of conversions steps needed in a
 chain of conversions. A DHTML version is also available.
 
 
-    ··  ·▁··   ··· ▁    ▂             ▁▁   ▁          ···      ·   ── 0 RGBA double
-                                                                   ── 1 RGB double
-                                                                   ── 2 RaGaBaA double
-                                                                   ── 3 R'G'B' double
-·    ▁  ▁▂▁▁   ▁▁▁ ·    ▁             ▂▂   ▂         ▁▁▁▁      ▁   ── 4 R'G'B'A double
-·       ▁▂▁▁   ▁▁▁      ▃             ▂▂   ▂         ▁▁▁▁      ▁   ── 5 R'aG'aB'aA double
-▂   ▂  ·▁·▃▃   ▂▂▂ ▁ ▁ ··             ▃▂ ▃ ▁         ▂▂▂▂      ▃   ── 6 R'G'B' u8
-▁   ▁▂  ·▂▃▂   ▂▂▂ · ▁  ▁             ▁▁   ▃         ▃▂▂▂      ▃   ── 7 R'G'B'A u8
-·   ▁▁   ·▁▁   ▁▁▁ ▂    ▃             ··   ·         ▁▁▁▁      ▁   ── 8 RGBA float
-▁   ▂▂    ▂▂   ▃▂▂ ▃                  ▂▁ ▂ ▁         ▂▂▂▂      ▂   ── 9 RGB float
-·   ▁▁  ▁  ▁   ▁▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂         ▁▁▁▁      ▁   ──10 Y double
-·   ▁▁  ▁▂     ▁▁▁ ▂    ▃             ▂▂   ▂         ▁▁▁▁      ▁   ──11 YA double
-                                                                   ──12 YaA double
-                                                                   ──13 Y' double
-                                                                   ──14 Y'A double
-·   ▁▁  ▁▂▁▁    ▁▁ ▂    ▃             ▂▂   ▂         ▁ ▁▁      ▁   ──15 Y'aA double
-·   ▁▁  ▁▂▁▁     ▁ ▂ ▃  ▃             ▃▂ ▃ ▂          ▁▁▁      ▁   ──16 Y'CbCr double
-·   ▁   ▁▂▁▁   ▁   ▂    ▃             ▂▂   ▃         ▁▁▁▁      ▁   ──17 Y'CbCrA double
-                                                                   ──18 Y'CbCr u8
-▁   ·▂  ▂▃▂▂   ▂▂▂      ·             ▃▃   ▃         ▂▂▂▂      ▂   ──19 R'G'B'A float
-▂   ▁▃  ▃ ▃▃   ▃▃▃   ▁  ▁                            ▃▃▃▃      ▃   ──20 R'G'B'A u16
-                                                     ▃▃▃▃          ──21 R'aG'aB'aA float
-▃   ▂              ▁    ▂                                          ──22 R'aG'aB'aA u16
-▃   ▂              ▁ ·  ▂                                          ──23 R'aG'aB'aA u8
-▃   ▁▃  ▃ ▃▃   ▃▃▃ · ·                               ▃▃▃▃      ▃   ──24 R'G'B' float
-▃   ▂              ▁ ▁                                             ──25 R'G'B' u16
-    ▁              · ▁  ▁  ·· ▂  ▁                                 ──26 Y'A float
-    ▂              ▁ ·  ▂   ▁ ▁  ·                                 ──27 Y'aA float
-    ▂              ▃ ▂  · ·                                        ──28 Y' float
-    ▂              ▁ ▂  ▂ ·▁  ▃  ▂                                 ──29 Y'A u16
-    ▃              ▂ ▁  ▃ ▁·▂    ▁                                 ──30 Y'aA u16
-    ▃              ▂ ▂  ▁ ▁▁·                                      ──31 Y' u16
-▁   ▂▃  ·▂▂▂   ▃▂▃ ▁ ▂  ▂ ·▁▁ ▃  ▃    ▁▂   ▂·▁▁      ▂▃▃▃      ▃   ──32 Y'A u8
-    ▃              ▂ ▁  ▃ ▁·▂ ·                                    ──33 Y'aA u8
-▃   ▃▂  ·▁▂▂   ▂▂▂ ▂ ▂  ▁ ▁▂·         ▁▃ ▂ ▃▁▂·      ▂▂▂▂      ▂   ──34 Y' u8
-▃   ▂              ▁ ▂  ·                                          ──35 Y'CbCr float
-▂   ▁▃  ▃ ▃▃   ▃▃  ·    ▁                            ▃▃▃▃      ▃   ──36 Y'CbCrA float
-▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                  ▁▁   ▁         ▂▂▂▂      ▂   ──37 RGBA u16
-▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                   ·   ·         ▂▂▂▂      ▂   ──38 RGBA u8
-▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                       ▁         ▂▂▂▂      ▂   ──39 RaGaBaA float
-▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂    ▂         ▃▃▃▃      ▃   ──40 RaGaBaA u16
-▂   ▃▃  ▁▂▃▃   ▃▃▃                     ·             ▃▃▃▃      ▃   ──41 RaGaBaA u8
-▃   ▃▃  ▁·▃▃   ▃▃▃                    ▃▂   ▂         ▃▃▃▃      ▃   ──42 RGB u16
-▁   ▃▃  ··▃▃   ▂▃▂ ▃                  ·▁ ·           ▃▃▂▂      ▃   ──43 RGB u8
-▁   ▂▂  ·▁▂    ▂▂▂ ▃                  ▁▁     ··      ▂▂▂▂      ▂   ──44 YA float
-▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂·   ▂         ▃▃▃▃      ▃   ──45 YaA float
-▂   ▃▃  ▁· ▃   ▃▃▃                    ▂▂ ▃ ▂·        ▃▃▃▃      ▃   ──46 Y float
-▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂▂   ▂·▁       ▃▃▃▃      ▃   ──47 YA u16
-▃       ▂▃                            ▃▁   ▃ ·                     ──48 YaA u16
-▃       ▂▃                            ▃▂   ▃▁▁·                    ──49 Y u16
-▁   ▃▃  ▁▂▃▃   ▂▂▃ ▃                  ▁▂   ▂·▁▁      ▃▃▃▂      ▃   ──50 YA u8
-▃       ▂▃                             ▁    ▁·▂                    ──51 YaA u8
-▃   ▂▂  ▃▁▂▂   ▂▂▂ ▃                  ▁▃ ▂ ▃▁▁·      ▂▂▂▂      ▂   ──52 Y u8
-·   ▁▁  ▁▂▁▁   ▁▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂          ▁▁▁      ▁   ──53 CIE Lab double
-·   ▁▁  ▁▂▁▁   ▁▁▁ ▂    ▃             ▂▂   ▂           ▁▁      ▁   ──54 CIE Lab alpha double
-·    ▁  ▁▂▁▁   ▁▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂         ▁  ▁      ▁   ──55 CIE LCH(ab) double
-·    ▁  ▁▂▁▁   ▁▁▁ ▂    ▃             ▂▂   ▂         ▁▁        ▁   ──56 CIE LCH(ab) alpha double
-                                                                   ──57 CIE Lab float
-                                                                   ──58 CIE Lab alpha float
-                                                                   ──59 CIE Lab u8
-                                                                   ──60 CIE Lab u16
-                                                                   ──61 CIE LCH(ab) float
-                                                                   ──62 CIE LCH(ab) alpha float
-·   ▁▁  ▁▂▁▁   ▁▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂         ▁▁▁▁          ──63 CMYK double
-                                                                   ──64 CMYK float
-                                                                   ──65 B'aG'aR'aA u8
-                                                                   ──66 B'aG'aR'aPAD u8
-|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-||||||||||111111111122222222223333333333444444444455555555556666666
-0123456789012345678901234567890123456789012345678901234567890123456
-total length: 2171
-total cost  : 404497
+    ··  ·▁··   ··· ▁    ▂             ▁▁   ▁         ····         ·   ── 0 RGBA double
+                                                                      ── 1 RGB double
+                                                                      ── 2 RaGaBaA double
+                                                                      ── 3 R'G'B' double
+·    ▁  ▁▂▁▁   ▁▁▁ ·    ▁             ▂▂   ▂         ▁▁▁▁         ▁   ── 4 R'G'B'A double
+·       ▁▂▁▁   ▁▁       ▃             ▂▂   ▂         ▁▁▁▁         ▁   ── 5 R'aG'aB'aA double
+▂   ▂  ·▁·▃▃   ▃▃▂ ▁ ▁ ··             ▂▁ ▃ ▁         ▂▃▂▂         ▃   ── 6 R'G'B' u8
+▁   ▁▂  ·▁▂▂   ▂▂▂ · ▁  ▁             ▁▁   ▁         ▂▂▂▂         ▃   ── 7 R'G'B'A u8
+·   ▁▁   ·▁▁   ▁▁▁ ▂    ▃             ··   ·         ▁▁▁▁         ▁   ── 8 RGBA float
+▁   ▃▂    ▂▂   ▂▃▂ ▃                  ▂▁ ▂ ▁         ▂▂▂▂         ▂   ── 9 RGB float
+·   ▁▁  ▁  ▁   ▁▁▁ ▂ ▃  ▃             ▂▂ ▃ ▂         ▁▁▁▁         ▁   ──10 Y double
+·   ▁▁  ▁▂     ▁▁▁ ▂    ▃             ▂▂   ▂         ▁▁▁▁         ▁   ──11 YA double
+                                                                      ──12 YaA double
+                                                                      ──13 Y' double
+                                                                      ──14 Y'A double
+·   ▁▁  ▁▂▁▁    ▁▁ ▂    ▃             ▂▂   ▃         ▁▁▁▁         ▁   ──15 Y'aA double
+·   ▁▁  ▁▂▁▁     ▁ ▂ ▃  ▃             ▂▂ ▃ ▂         ▁▁▁▁         ▁   ──16 Y'CbCr double
+·   ▁▁  ▁▂▁▁   ▁   ▂    ▃             ▂▂   ▂         ▁▁▁▁         ▁   ──17 Y'CbCrA double
+                                                                      ──18 Y'CbCr u8
+▁   ·▂  ▂▃▂▂   ▂▂▂      ·             ▃▃   ▃         ▂▂▂          ▂   ──19 R'G'B'A float
+▂   ▁▃  ▃ ▃▃   ▃▃▃   ▁  ▁                            ▃▃▃▃         ▃   ──20 R'G'B'A u16
+                                                     ▃▃▃▃             ──21 R'aG'aB'aA float
+▃   ▂              ▁    ▂                                             ──22 R'aG'aB'aA u16
+▃   ▂              ▁ ·  ▂                                             ──23 R'aG'aB'aA u8
+▂   ▁▃  ▃ ▃▃   ▃▃▃ · ·                               ▃▃▃▃         ▃   ──24 R'G'B' float
+▃   ▂              ▂ ▁                                                ──25 R'G'B' u16
+    ▁              · ▁  ▁  ·· ▂  ▁                                    ──26 Y'A float
+    ▂              ▁ ·  ▂   ▁ ▁  ·                                    ──27 Y'aA float
+    ▂              ▁ ▁  · ·                                           ──28 Y' float
+    ▂              ▁ ▂  ▂ ·▂  ▃  ▂                                    ──29 Y'A u16
+    ▃              ▂ ▁  ▃ ▁·▂    ▁                                    ──30 Y'aA u16
+    ▃              ▂ ▂  ▁ ▁▂·                                         ──31 Y' u16
+▂   ▂▃  ·▂▃▂   ▂▂▂ ▁ ▂  ▂ ·▁▁ ▃  ▃    ▁▂   ▁·▁▁      ▃▃▃▂         ▂   ──32 Y'A u8
+    ▃              ▂ ▁  ▃ ▁·▂ ·                                       ──33 Y'aA u8
+▁   ▃▂  ▂▁▂▂   ▂▂▂ ▂ ▃  ▃ ▁▂·         ▁▃ ▂ ▃▁▂·      ▂▂▂▂         ▂   ──34 Y' u8
+▃   ▂              ▁ ▂  ·                                             ──35 Y'CbCr float
+▂   ▁▃  ▃ ▃▃   ▃▃  ·    ▁                            ▃▃▃▃         ▃   ──36 Y'CbCrA float
+▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                  ▁▁   ▁         ▂▂▂▂         ▂   ──37 RGBA u16
+▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                   ▁   ·         ▂▂▂▂         ▂   ──38 RGBA u8
+▁   ▂▂  ·▁▂▂   ▂▂▂ ▃                       ▁         ▂▂▂▂         ▂   ──39 RaGaBaA float
+▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂    ▂         ▃▃▃▃         ▃   ──40 RaGaBaA u16
+▂   ▃▃  ▁▂▃▃   ▃▃▃                     ·             ▃▃▃▃         ▃   ──41 RaGaBaA u8
+▃   ▃▃  ▂·▃▃   ▃▃▃                    ▃▁   ▂         ▃▃▃▃         ▃   ──42 RGB u16
+▂   ▃▂  ▁·▃▃   ▃▃▃ ▃                  ·▂ ·           ▃▃▃▂         ▃   ──43 RGB u8
+▁   ▂▂  ·▁▂    ▂▂▂ ▃                  ▁▁     ··      ▂▂▂▂         ▂   ──44 YA float
+▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂·   ▂         ▃▃▃▃         ▃   ──45 YaA float
+▂   ▃▃  ▁· ▃   ▃▃▃                    ▂▂ ▃ ▂·        ▃▃▃▃         ▃   ──46 Y float
+▂   ▃▃  ▁▂▃▃   ▃▃▃                    ▂▂   ▂·▁       ▃▃▃▃         ▃   ──47 YA u16
+▃       ▂▃                            ▃▁   ▃ ·                        ──48 YaA u16
+▃       ▂▁                            ▃▂   ▃▁▁·                       ──49 Y u16
+▂   ▂▂  ▁▂▃▃   ▃▃▃ ▃                  ▁▂   ▂·▁▁      ▃▃▃▂         ▃   ──50 YA u8
+▃       ▂▃                             ▁    ▁·▂                       ──51 YaA u8
+▃   ▂▂  ·▁▂▂   ▂▂▂ ▃                  ▁▃ ▂ ▃▁▂·      ▂▂▂▂         ▂   ──52 Y u8
+·   ▁▁  ▁▂▁▁   ▁▁▁ ▂ ▃  ▃             ▂▂ ▃ ▂          ▁▁▁         ▁   ──53 CIE Lab double
+·   ▁▁  ▁▂▁▁   ▁▁▁ ▂    ▃             ▂▂   ▂           ▁▁         ▁   ──54 CIE Lab alpha double
+·   ▁▁  ▁▂▁▁   ▁▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂         ▁  ▁         ▁   ──55 CIE LCH(ab) double
+·   ▁▁  ▁▂▁▁   ▁▁▁ ▂    ▃             ▂▂   ▂         ▁▁           ▁   ──56 CIE LCH(ab) alpha double
+                                                                      ──57 CIE Lab float
+                                                                      ──58 CIE Lab alpha float
+                                                                      ──59 CIE Lab u8
+                                                                      ──60 CIE Lab u16
+                                                                      ──61 CIE LCH(ab) float
+                                                                      ──62 CIE LCH(ab) alpha float
+                                                                      ──63 cairo-ARGB32
+                                                                      ──64 cairo-RGB24
+                                                                      ──65 cairo-A8
+·   ▁▁  ▁▂▁▁    ▁▁ ▂ ▃  ▃             ▃▂ ▃ ▂         ▁▁▁▁             ──66 CMYK double
+                                                                      ──67 CMYK float
+                                                                      ──68 B'aG'aR'aA u8
+                                                                      ──69 B'aG'aR'aPAD u8
+||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+||||||||||111111111122222222223333333333444444444455555555556666666666
+0123456789012345678901234567890123456789012345678901234567890123456789
+total length: 2172
+total cost  : 408270
 
 Environment
 
@@ -1377,4 +1418,4 @@ Daniel Paredes García danipga at gmail.com
 Rupert Weber gimp at leguanease.org
     Documentation and other improvements
 
-/babl-0.1.6
+/babl-0.1.8
index c1f8e25b3a566bfa366d24b4f5160d57f25a631d..cbd01769c8d3f5cc70b4415abd201577ba631cee 100644 (file)
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -179,12 +180,15 @@ else
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -194,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.3], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -210,19 +214,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -304,14 +310,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
+# serial 12
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -351,6 +357,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -415,7 +422,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -480,10 +487,13 @@ AC_DEFUN([AM_DEP_TRACK],
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
 AC_SUBST([AMDEPBACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
@@ -705,12 +715,15 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
@@ -750,8 +763,8 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -771,7 +784,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
        [disable], [m4_define([am_maintainer_other], [enable])],
        [m4_define([am_maintainer_other], [enable])
         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
   AC_ARG_ENABLE([maintainer-mode],
 [  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
@@ -882,12 +895,15 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for `mkdir -p'.
@@ -910,13 +926,14 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -924,13 +941,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
 
 # _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
 # Set option NAME.  Presently that only means defining a flag for this option.
 AC_DEFUN([_AM_SET_OPTION],
 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
 
 # _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -1006,13 +1023,13 @@ Check your system clock])
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2009  Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
+# serial 2
 
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
@@ -1027,18 +1044,50 @@ yes) AM_DEFAULT_VERBOSITY=0;;
 no)  AM_DEFAULT_VERBOSITY=1;;
 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
 esac
+dnl
+dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using `$V' instead of `$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
 AM_BACKSLASH='\'
 AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 1
+
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor `install' (even GNU) is that you can't
@@ -1061,13 +1110,13 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
+# serial 3
 
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
@@ -1076,13 +1125,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
 # AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
 # Public sister of _AM_SUBST_NOTMAKE.
 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1104,10 +1153,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
 AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
 m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
      [m4_case([$1], [ustar],, [pax],,
               [m4_fatal([Unknown tar format])])
 AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/babl/Babl-0.1.gir b/babl/Babl-0.1.gir
deleted file mode 100644 (file)
index 7ed6489..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file was automatically generated from C sources - DO NOT EDIT!
-To affect the contents of this file, edit the original C definitions,
-and/or use gtk-doc annotations.  -->
-<repository version="1.2"
-            xmlns="http://www.gtk.org/introspection/core/1.0"
-            xmlns:c="http://www.gtk.org/introspection/c/1.0"
-            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
-  <namespace name="Babl"
-             version="0.1"
-             shared-library="libbabl-0.1.so.0"
-             c:identifier-prefixes="Babl"
-             c:symbol-prefixes="babl">
-    <record name="" c:type="Babl" disguised="1">
-      <method name="et_name" c:identifier="babl_get_name">
-        <return-value transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </return-value>
-      </method>
-      <method name="ormat_get_bytes_per_pixel"
-              c:identifier="babl_format_get_bytes_per_pixel">
-        <return-value transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </return-value>
-      </method>
-      <method name="ormat_get_n_components"
-              c:identifier="babl_format_get_n_components">
-        <return-value transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </return-value>
-      </method>
-      <method name="ormat_has_alpha" c:identifier="babl_format_has_alpha">
-        <return-value transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </return-value>
-      </method>
-      <method name="ormat_is_format_n" c:identifier="babl_format_is_format_n">
-        <return-value transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </return-value>
-      </method>
-      <method name="ormat_n" c:identifier="babl_format_n" introspectable="0">
-        <return-value>
-          <type name="" c:type="Babl*"/>
-        </return-value>
-        <parameters>
-          <parameter name="components" transfer-ownership="none">
-            <type name="gint" c:type="int"/>
-          </parameter>
-        </parameters>
-      </method>
-      <method name="rocess" c:identifier="babl_process">
-        <return-value transfer-ownership="none">
-          <type name="glong" c:type="long"/>
-        </return-value>
-        <parameters>
-          <parameter name="source" transfer-ownership="none">
-            <type name="gpointer" c:type="void*"/>
-          </parameter>
-          <parameter name="destination" transfer-ownership="none">
-            <type name="gpointer" c:type="void*"/>
-          </parameter>
-          <parameter name="n" transfer-ownership="none">
-            <type name="glong" c:type="long"/>
-          </parameter>
-        </parameters>
-      </method>
-    </record>
-    <callback name="FuncLinear" c:type="BablFuncLinear">
-      <return-value transfer-ownership="none">
-        <type name="glong" c:type="long"/>
-      </return-value>
-      <parameters>
-        <parameter name="src" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="dst" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="n" transfer-ownership="none">
-          <type name="glong" c:type="long"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <callback name="FuncPlanar" c:type="BablFuncPlanar">
-      <return-value transfer-ownership="none">
-        <type name="glong" c:type="long"/>
-      </return-value>
-      <parameters>
-        <parameter name="src_bands" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="src" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="src_pitch" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="dst_bands" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="dst" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-        <parameter name="dst_pitch" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="n" transfer-ownership="none">
-          <type name="glong" c:type="long"/>
-        </parameter>
-      </parameters>
-    </callback>
-    <constant name="MAJOR_VERSION" value="0">
-      <type name="gint" c:type="gint"/>
-    </constant>
-    <constant name="MINOR_VERSION" value="1">
-      <type name="gint" c:type="gint"/>
-    </constant>
-    <function name="component"
-              c:identifier="babl_component"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="name" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="component_new"
-              c:identifier="babl_component_new"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="first_arg" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="conversion_new"
-              c:identifier="babl_conversion_new"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="first_arg" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="exit" c:identifier="babl_exit">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-    </function>
-    <function name="fish" c:identifier="babl_fish" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="source_format" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter name="destination_format" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="format" c:identifier="babl_format" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="name" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="format_get_type"
-              c:identifier="babl_format_get_type"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="format" transfer-ownership="none">
-          <type name="" c:type="Babl*"/>
-        </parameter>
-        <parameter name="component_index" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="format_new"
-              c:identifier="babl_format_new"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="first_arg" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="get_version" c:identifier="babl_get_version">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-      <parameters>
-        <parameter name="major" transfer-ownership="none">
-          <type name="gint" c:type="int*"/>
-        </parameter>
-        <parameter name="minor" transfer-ownership="none">
-          <type name="gint" c:type="int*"/>
-        </parameter>
-        <parameter name="micro" transfer-ownership="none">
-          <type name="gint" c:type="int*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="init" c:identifier="babl_init">
-      <return-value transfer-ownership="none">
-        <type name="none" c:type="void"/>
-      </return-value>
-    </function>
-    <function name="model" c:identifier="babl_model" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="name" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="model_new"
-              c:identifier="babl_model_new"
-              introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="first_arg" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="sampling" c:identifier="babl_sampling" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="horizontal" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-        <parameter name="vertical" transfer-ownership="none">
-          <type name="gint" c:type="int"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="type" c:identifier="babl_type" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="name" transfer-ownership="none">
-          <type name="utf8" c:type="char*"/>
-        </parameter>
-      </parameters>
-    </function>
-    <function name="type_new" c:identifier="babl_type_new" introspectable="0">
-      <return-value>
-        <type name="" c:type="Babl*"/>
-      </return-value>
-      <parameters>
-        <parameter name="first_arg" transfer-ownership="none">
-          <type name="gpointer" c:type="void*"/>
-        </parameter>
-        <parameter transfer-ownership="none">
-          <varargs>
-          </varargs>
-        </parameter>
-      </parameters>
-    </function>
-  </namespace>
-</repository>
index 93c2657f83f56e10cdb21904f39597fd141eeb1b..cefab57238d77336e24aef7c212d4ea312fb81cf 100644 (file)
@@ -27,6 +27,7 @@ c_sources =                           \
        babl-memory.c                   \
        babl-model.c                    \
        babl-mutex.c                    \
+       babl-palette.c    \
        babl-sampling.c                 \
        babl-sanity.c                   \
        babl-type.c                     \
index 4413ca1469b3a220853850145154c1e2227891e3..2b890520a3d5d3e84168aa076e90e1a076034f57 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -73,6 +73,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
        "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(vapidir)" \
        "$(DESTDIR)$(library_includedir)"
@@ -85,15 +91,15 @@ am__objects_2 = babl.lo babl-component.lo babl-conversion.lo \
        babl-fish-reference.lo babl-fish-simple.lo babl-fish-stats.lo \
        babl-fish.lo babl-format.lo babl-hash-table.lo babl-image.lo \
        babl-internal.lo babl-introspect.lo babl-list.lo \
-       babl-memory.lo babl-model.lo babl-mutex.lo babl-sampling.lo \
-       babl-sanity.lo babl-type.lo babl-util.lo babl-cpuaccel.lo \
-       babl-version.lo
+       babl-memory.lo babl-model.lo babl-mutex.lo babl-palette.lo \
+       babl-sampling.lo babl-sanity.lo babl-type.lo babl-util.lo \
+       babl-cpuaccel.lo babl-version.lo
 am_libbabl_@BABL_API_VERSION@_la_OBJECTS = $(am__objects_1) \
        $(am__objects_2)
 libbabl_@BABL_API_VERSION@_la_OBJECTS =  \
        $(am_libbabl_@BABL_API_VERSION@_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 libbabl_@BABL_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -109,21 +115,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
 am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(libbabl_@BABL_API_VERSION@_la_SOURCES)
 DIST_SOURCES = $(libbabl_@BABL_API_VERSION@_la_SOURCES)
@@ -344,6 +350,7 @@ c_sources = \
        babl-memory.c                   \
        babl-model.c                    \
        babl-mutex.c                    \
+       babl-palette.c    \
        babl-sampling.c                 \
        babl-sanity.c                   \
        babl-type.c                     \
@@ -482,7 +489,7 @@ clean-libLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libbabl-@BABL_API_VERSION@.la: $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_DEPENDENCIES) 
+libbabl-@BABL_API_VERSION@.la: $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libbabl_@BABL_API_VERSION@_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(libbabl_@BABL_API_VERSION@_la_LINK) -rpath $(libdir) $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
@@ -512,6 +519,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-memory.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-model.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-mutex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-palette.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-sampling.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-sanity.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-type.Plo@am__quote@
@@ -522,26 +530,23 @@ distclean-compile:
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -565,9 +570,7 @@ uninstall-girDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(girdir)" && rm -f $$files
+       dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
 install-typelibsDATA: $(typelibs_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(typelibsdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibsdir)"
@@ -585,9 +588,7 @@ uninstall-typelibsDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(typelibsdir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(typelibsdir)" && rm -f $$files
+       dir='$(DESTDIR)$(typelibsdir)'; $(am__uninstall_files_from_dir)
 install-vapiDATA: $(vapi_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(vapidir)" || $(MKDIR_P) "$(DESTDIR)$(vapidir)"
@@ -605,9 +606,7 @@ uninstall-vapiDATA:
        @$(NORMAL_UNINSTALL)
        @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(vapidir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(vapidir)" && rm -f $$files
+       dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir)
 install-library_includeHEADERS: $(library_include_HEADERS)
        @$(NORMAL_INSTALL)
        test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)"
@@ -625,9 +624,7 @@ uninstall-library_includeHEADERS:
        @$(NORMAL_UNINSTALL)
        @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       test -n "$$files" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(library_includedir)" && rm -f $$files
+       dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -840,10 +837,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 4e9bbafc4ecb524a934cb2c43941fa716f918998..47c783d39520a362c2a67dcf96371e44f4d0cf9f 100644 (file)
@@ -33,11 +33,11 @@ typedef int  (*BablEachFunction) (Babl *entry,
  * to be iterated over, common functionality is defined through these
  * macros.
  */
-#define BABL_CLASS_DECLARE(klass)                                    \
-                                                                     \
-BablDb * babl_##klass##_db (void);                                   \
-Babl   * babl_##klass##_from_id        (int id);                     \
-void     babl_##klass##_class_for_each (BablEachFunction  each_fun,  \
+#define BABL_CLASS_DECLARE(klass)                                          \
+                                                                           \
+BablDb       * babl_##klass##_db (void);                                   \
+const Babl   * babl_##klass##_from_id        (int id);                     \
+void           babl_##klass##_class_for_each (BablEachFunction  each_fun,  \
                                         void             *user_data)
 
 /* common header for any item inserted into database, the actual
index 65e876781522b69219f02dac1079b2d80cef7ee7..a483b19617b41efe185b2e97d82f33d7639f21a4 100644 (file)
@@ -58,7 +58,7 @@ is_component_duplicate (Babl *babl, int luma, int chroma, int alpha)
 }
 
 
-Babl *
+const Babl *
 babl_component_new (void *first_arg,
                     ...)
 {
index 446979da3fa696883a1e0cdd7755bd862997a8c4..15beb91774f1fd3743ef0d2106c9e000cebcea91 100644 (file)
@@ -32,7 +32,8 @@ conversion_new (const char    *name,
                 Babl          *destination,
                 BablFuncLinear linear,
                 BablFuncPlane  plane,
-                BablFuncPlanar planar)
+                BablFuncPlanar planar,
+                void          *user_data)
 {
   Babl *babl = NULL;
 
@@ -103,11 +104,13 @@ conversion_new (const char    *name,
   babl->conversion.pixels      = 0;
   babl->conversion.processings = 0;
 
+  babl->conversion.data = user_data;
+
   if (babl->class_type == BABL_CONVERSION_LINEAR &&
       BABL (babl->conversion.source)->class_type == BABL_MODEL)
     {
-      Babl *src_format = NULL;
-      Babl *dst_format = NULL;
+      const Babl *src_format = NULL;
+      const Babl *dst_format = NULL;
       if (BABL (babl->conversion.source) == babl_model_from_id (BABL_RGBA))
         {
           src_format = babl_format_from_id (BABL_RGBA_DOUBLE);
@@ -130,6 +133,7 @@ conversion_new (const char    *name,
         src_format,
         dst_format,
         "linear", linear,
+        "data", user_data,
         NULL);
       babl->conversion.error = 0.0;
     }
@@ -167,8 +171,8 @@ create_name (Babl *source, Babl *destination, int type)
   return buf;
 }
 
-Babl *
-babl_conversion_new (void *first_arg,
+const Babl *
+babl_conversion_new (const void *first_arg,
                      ...)
 {
   va_list        varg;
@@ -181,6 +185,7 @@ babl_conversion_new (void *first_arg,
   int            type     = 0;
   int            got_func = 0;
   const char    *arg      = first_arg;
+  void          *user_data= NULL;
 
   Babl          *source;
   Babl          *destination;
@@ -203,6 +208,11 @@ babl_conversion_new (void *first_arg,
           id = va_arg (varg, int);
         }
 
+      else if (!strcmp (arg, "data"))
+        {
+          user_data = va_arg (varg, void*);
+        }
+
       else if (!strcmp (arg, "linear"))
         {
           if (got_func++)
@@ -270,7 +280,8 @@ babl_conversion_new (void *first_arg,
       babl = babl_db_exist (db, id, name);
     }
 
-  babl = conversion_new (name, id, source, destination, linear, plane, planar);
+  babl = conversion_new (name, id, source, destination, linear, plane, planar, 
+                         user_data);
 
   /* Since there is not an already registered instance by the required
    * id/name, inserting newly created class into database.
@@ -284,16 +295,16 @@ babl_conversion_new (void *first_arg,
 
 static long
 babl_conversion_linear_process (BablConversion *conversion,
-                                void           *source,
+                                const void     *source,
                                 void           *destination,
                                 long            n)
 {
-  return conversion->function.linear (source, destination, n);
+  return conversion->function.linear (source, destination, n, conversion->data);
 }
 
 static long
 babl_conversion_plane_process (BablConversion *conversion,
-                               void           *source,
+                               const void     *source,
                                void           *destination,
                                int             src_pitch,
                                int             dst_pitch,
@@ -301,7 +312,8 @@ babl_conversion_plane_process (BablConversion *conversion,
 {
   return conversion->function.plane (source, destination,
                                      src_pitch, dst_pitch,
-                                     n);
+                                     n,
+                                     conversion->data);
 }
 
 static long
@@ -311,10 +323,10 @@ babl_conversion_planar_process (BablConversion *conversion,
                                 long            n)
 {
 #ifdef USE_ALLOCA
-  char **src_data = alloca (sizeof (void *) * source->components);
+  const char **src_data = alloca (sizeof (void *) * source->components);
   char **dst_data = alloca (sizeof (void *) * destination->components);
 #else
-  char  *src_data[BABL_MAX_COMPONENTS];
+  const char  *src_data[BABL_MAX_COMPONENTS];
   char  *dst_data[BABL_MAX_COMPONENTS];
 #endif
 
@@ -327,14 +339,15 @@ babl_conversion_planar_process (BablConversion *conversion,
                                       destination->components,
                                       dst_data,
                                       destination->pitch,
-                                      n);
+                                      n,
+                                      conversion->data);
 }
 
 long
-babl_conversion_process (Babl *babl,
-                         char *source,
-                         char *destination,
-                         long  n)
+babl_conversion_process (const Babl *babl,
+                         const char *source,
+                         char       *destination,
+                         long        n)
 {
   BablConversion *conversion = (BablConversion *) babl;
 
@@ -344,7 +357,7 @@ babl_conversion_process (Babl *babl,
     {
       case BABL_CONVERSION_PLANE:
       {
-        void *src_data  = NULL;
+        const void *src_data  = NULL;
         void *dst_data  = NULL;
         int   src_pitch = 0;
         int   dst_pitch = 0;
@@ -454,13 +467,13 @@ babl_conversion_error (BablConversion *conversion)
   Babl *fmt_source;
   Babl *fmt_destination;
 
-  Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
-                                           babl_type ("double"),
-                                           babl_component ("R"),
-                                           babl_component ("G"),
-                                           babl_component ("B"),
-                                           babl_component ("A"),
-                                           NULL);
+  const Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
+                                                 babl_type ("double"),
+                                                 babl_component ("R"),
+                                                 babl_component ("G"),
+                                                 babl_component ("B"),
+                                                 babl_component ("A"),
+                                                 NULL);
 
   double  error       = 0.0;
   long    ticks_start = 0;
@@ -545,7 +558,6 @@ babl_conversion_error (BablConversion *conversion)
   fish_reference->fish.pixels           -= test_pixels;
   fish_destination_to_rgba->fish.pixels -= 2 * test_pixels;
 
-
   babl_free (source);
   babl_free (destination);
   babl_free (destination_rgba_double);
index fbbb2798ced9e5fbbb8965ade30c25031bfe40ce..902beb5553c623d041622c7614ecdf109265a386 100644 (file)
 
 BABL_CLASS_DECLARE (conversion);
 
-Babl * babl_conversion (const char *name);
-
-
+const Babl * babl_conversion (const char *name);
 
 /* Signature of functions registered for reference type
  * conversions,
  */
-typedef long (*BablFuncPlane)     (char  *src,
-                                   char  *dst,
-                                   int    src_pitch,
-                                   int    dst_pitch,
-                                   long   n);
+typedef long (*BablFuncPlane)     (const char  *src,
+                                   char        *dst,
+                                   int          src_pitch,
+                                   int          dst_pitch,
+                                   long         n,
+                                   void        *user_data);
 
 
 typedef struct
@@ -48,6 +47,7 @@ BablConversion {
       BablFuncPlane      plane;
       BablFuncPlanar     planar;
     } function;
+  void                  *data;  /* user data */
   int                    processings;
   long                   pixels;
 } BablConversion;
index 4c2610a5415c75df2337a1d203465453b83b89cd..b0b8b36cadaf78e43c4dcb3e39d46382b69db859 100644 (file)
@@ -27,8 +27,8 @@ BABL_CLASS_DECLARE (extension);
  * BablExtension objects are only used internally in babl.
  */
 
-Babl * babl_extension (const char *name);
-void   babl_extension_load_dir_list (const char *dir_list);
+const  Babl * babl_extension               (const char *name);
+void          babl_extension_load_dir_list (const char *dir_list);
 
 typedef struct
 {
index da5e0b0eac78471ae2c6fcbc18b13e8ced3a4700..7914e0c84162a9e8466d20161c2be1803ceadc76 100644 (file)
 #define BABL_HARD_MAX_PATH_LENGTH  8
 #define BABL_MAX_NAME_LEN          1024
 
+int   babl_in_fish_path = 0;
 
 typedef struct _FishPathInstrumentation
 {
-  Babl   *fmt_rgba_double;
+  const Babl   *fmt_rgba_double;
   double *test;
   void   *source;
   void   *destination;
   void   *ref_destination;
   double *destination_rgba_double;
   double *ref_destination_rgba_double;
-  Babl   *fish_rgba_to_source;
-  Babl   *fish_reference;
-  Babl   *fish_destination_to_rgba;
+  const Babl   *fish_rgba_to_source;
+  const Babl   *fish_reference;
+  const Babl   *fish_destination_to_rgba;
   double  reference_cost;
   int     init_instrumentation_done;
 } FishPathInstrumentation;
@@ -64,10 +65,10 @@ get_path_instrumentation (FishPathInstrumentation *fpi,
                           double                  *path_error);
 
 static long
-process_conversion_path (BablList *path,
-                         void     *source_buffer,
-                         void     *destination_buffer,
-                         long     n);
+process_conversion_path (BablList   *path,
+                         const void *source_buffer,
+                         void       *destination_buffer,
+                         long        n);
 
 static void
 get_conversion_path (PathContext *pc,
@@ -286,15 +287,20 @@ babl_fish_path (const Babl *source,
     pc.fish_path = babl;
     pc.to_format = (Babl *) destination;
 
-    babl_mutex_lock (babl_format_mutex);
+    if (babl_in_fish_path <= 0)
+      babl_mutex_lock (babl_format_mutex);
     /* we hold a global lock whilerunning get_conversion_path since
      * it depends on keeping the various format.visited members in
      * a consistent state, this code path is not performance critical
      * since created fishes are cached.
      */
+    babl_in_fish_path++;
 
     get_conversion_path (&pc, (Babl *) source, 0, max_path_length ());
-    babl_mutex_unlock (babl_format_mutex);
+
+    babl_in_fish_path--;
+    if (babl_in_fish_path <= 0)
+      babl_mutex_unlock (babl_format_mutex);
     babl_free (pc.current_path);
   }
 
@@ -312,24 +318,23 @@ babl_fish_path (const Babl *source,
 }
 
 static long
-babl_fish_path_process (Babl *babl,
-                        void *source,
-                        void *destination,
-                        long  n)
+babl_fish_path_process (Babl       *babl,
+                        const void *source,
+                        void       *destination,
+                        long        n)
 {
   return process_conversion_path (babl->fish_path.conversion_list,
-                                 source,
-                                 destination,
-                                 n);
+                                  source,
+                                  destination,
+                                  n);
 
 }
 
-
 static long
-babl_fish_process (Babl *babl,
-                   void *source,
-                   void *destination,
-                   long  n)
+babl_fish_process (Babl       *babl,
+                   const void *source,
+                   void       *destination,
+                   long        n)
 {
   long ret = 0;
 
@@ -373,11 +378,12 @@ babl_fish_process (Babl *babl,
 }
 
 long
-babl_process (Babl *babl,
-              void *source,
-              void *destination,
-              long  n)
+babl_process (const Babl *cbabl,
+              const void *source,
+              void       *destination,
+              long        n)
 {
+  Babl *babl = (Babl*)cbabl;
   babl_assert (babl);
   babl_assert (source);
   babl_assert (destination);
@@ -405,10 +411,10 @@ babl_process (Babl *babl,
 }
 
 static long
-process_conversion_path (BablList *path,
-                         void     *source_buffer,
-                         void     *destination_buffer,
-                         long     n)
+process_conversion_path (BablList   *path,
+                         const void *source_buffer,
+                         void       *destination_buffer,
+                         long        n)
 {
   int conversions = babl_list_size (path);
 
index fa47ea920cf6cf1c5705c74507068b5d13c9300a..b00d67d787eb9115ed1d57668d84cb9b97e4932d 100644 (file)
@@ -20,8 +20,8 @@
 #include "babl-internal.h"
 
 static Babl *
-assert_conversion_find (void *source,
-                        void *destination)
+assert_conversion_find (const void *source,
+                        const void *destination)
 {
   Babl *ret = babl_conversion_find (source, destination);
 
@@ -92,11 +92,11 @@ babl_fish_reference (const Babl *source,
 
 
 static void
-convert_to_double (BablFormat *source_fmt,
-                   BablImage  *source,
-                   char       *source_buf,
-                   char       *source_double_buf,
-                   int         n)
+convert_to_double (BablFormat      *source_fmt,
+                   const BablImage *source,
+                   char            *source_buf,
+                   char            *source_double_buf,
+                   int              n)
 {
   int        i;
 
@@ -203,11 +203,11 @@ convert_from_double (BablFormat *destination_fmt,
 
 
 static void
-ncomponent_convert_to_double (BablFormat *source_fmt,
-                              BablImage  *source,
-                              char       *source_buf,
-                              char       *source_double_buf,
-                              int         n)
+ncomponent_convert_to_double (BablFormat       *source_fmt,
+                              const BablImage  *source,
+                              char             *source_buf,
+                              char             *source_double_buf,
+                              int               n)
 {
   BablImage *src_img;
   BablImage *dst_img;
@@ -276,10 +276,10 @@ ncomponent_convert_from_double (BablFormat *destination_fmt,
 
 
 static int
-process_same_model (Babl      *babl,
-                    BablImage *source,
-                    BablImage *destination,
-                    long       n)
+process_same_model (const Babl      *babl,
+                    const BablImage *source,
+                    BablImage       *destination,
+                    long             n)
 {
   void *double_buf;
 
@@ -341,10 +341,10 @@ process_same_model (Babl      *babl,
 }
 
 long
-babl_fish_reference_process (Babl      *babl,
-                             BablImage *source,
-                             BablImage *destination,
-                             long       n)
+babl_fish_reference_process (const Babl      *babl,
+                             const BablImage *source,
+                             BablImage       *destination,
+                             long             n)
 {
   void *source_double_buf;
   void *rgba_double_buf;
index f4893dbf877adcbfccf298f2d8247945a1d6a703..ccd4037e1ad29b5218c6749237afc2d2484f78c0 100644 (file)
@@ -35,12 +35,12 @@ static int
 table_destination_sum_each (Babl *babl,
                             void *userdata)
 {
-  Babl *source      = userdata;
-  Babl *destination = babl;
+  const Babl *source      = userdata;
+  const Babl *destination = babl;
 
   if (source != destination)
     {
-      Babl *fish = babl_fish (source, destination);
+      const Babl *fish = babl_fish (source, destination);
       babl_assert (fish);
       sum_pixels += fish->fish.pixels;
     }
@@ -76,7 +76,7 @@ table_destination_each (Babl *babl,
     fprintf (output_file, "<td class='cell'>&nbsp;</td>");
   else
     {
-      Babl *fish = babl_fish (source, destination);
+      const Babl *fish = babl_fish (source, destination);
 
       babl_assert (fish);
 
index 67e53fbdbd6f5442c0f46906883ac891793995e8..76cb53d0cc5f7ad8be23e503ee25b1aff7ad0103 100644 (file)
@@ -138,7 +138,7 @@ babl_fish_get_id (const Babl *source,
   return id;
 }
 
-Babl *
+const Babl *
 babl_fish (const void *source,
            const void *destination)
 {
index 463a92bc1a7f468819d29a72246c2c3e237ed5e2..7f43911f2f7be6d9e34d5b21f914f475bbf9a582 100644 (file)
@@ -48,7 +48,7 @@ format_new (const char     *name,
             BablModel      *model,
             BablComponent **component,
             BablSampling  **sampling,
-            BablType      **type)
+            const BablType **type)
 {
   Babl *babl;
 
@@ -67,8 +67,10 @@ format_new (const char     *name,
       if (!component_found)
         {
           component_found = 0;
-          babl_fatal ("matching source component for %s in model %s not found",
+#if 0 /* since babl does the right thing, let it happen */
+          babl_fatal("matching source component for %s in model %s not found",
                       model->component[i]->instance.name, model->instance.name);
+#endif
         }
     }
 
@@ -119,17 +121,17 @@ format_new (const char     *name,
 
 
 static char *
-create_name (BablModel      *model,
-             int             components,
-             BablComponent **component,
-             BablType      **type)
+create_name (const BablModel *model,
+             int              components,
+             BablComponent  **component,
+             const BablType **type)
 {
   char            buf[512] = "";
   char           *p = &buf[0];
   int             i;
   int             same_types = 1;
-  BablType      **t          = type;
-  BablType       *first_type = *type;
+  const BablType**t          = type;
+  const BablType *first_type = *type;
   BablComponent **c1         = component;
   BablComponent **c2         = model->component;
 
@@ -188,8 +190,8 @@ create_name (BablModel      *model,
 
 
 static char *
-ncomponents_create_name (Babl *type,
-                         int   components)
+ncomponents_create_name (const Babl *type,
+                         int         components)
 {
   char buf[512];
   sprintf (buf, "%s[%i] ", type->instance.name, components);
@@ -205,8 +207,8 @@ babl_format_set_is_format_n (Babl *format)
     }
 }
 
-Babl *
-babl_format_n (Babl *btype,
+const Babl *
+babl_format_n (const Babl *btype,
                int   components)
 {
   int            i;
@@ -216,7 +218,7 @@ babl_format_n (Babl *btype,
   BablModel     *model      = (BablModel *)babl_model ("Y");
   BablComponent *component [components];
   BablSampling  *sampling  [components];
-  BablType      *type      [components];
+  const BablType *type      [components];
   char          *name       = NULL;
 
   for (i = 0; i<components; i++)
@@ -250,7 +252,7 @@ babl_format_n (Babl *btype,
 }
 
 int
-babl_format_is_format_n (Babl *format)
+babl_format_is_format_n (const Babl *format)
 {
   if (format->class_type == BABL_FORMAT)
     {
@@ -262,13 +264,13 @@ babl_format_is_format_n (Babl *format)
 
 
 static int
-is_format_duplicate (Babl           *babl,
-                     int             planar,
-                     int             components,
-                     BablModel      *model,
-                     BablComponent **component,
-                     BablSampling  **sampling,
-                     BablType      **type)
+is_format_duplicate (Babl            *babl,
+                     int              planar,
+                     int              components,
+                     BablModel       *model,
+                     BablComponent  **component,
+                     BablSampling   **sampling,
+                     const BablType **type)
 {
   int i;
 
@@ -287,8 +289,8 @@ is_format_duplicate (Babl           *babl,
   return 1;
 }
 
-Babl *
-babl_format_new (void *first_arg,
+const Babl *
+babl_format_new (const void *first_arg,
                  ...)
 {
   va_list        varg;
@@ -299,12 +301,12 @@ babl_format_new (void *first_arg,
   BablModel     *model      = NULL;
   BablComponent *component [BABL_MAX_COMPONENTS];
   BablSampling  *sampling  [BABL_MAX_COMPONENTS];
-  BablType      *type      [BABL_MAX_COMPONENTS];
+  const BablType*type      [BABL_MAX_COMPONENTS];
 
   BablSampling  *current_sampling = (BablSampling *) babl_sampling (1, 1);
   BablType      *current_type     = (BablType *) babl_type_from_id (BABL_DOUBLE);
   char          *name             = NULL;
-  void          *arg              = first_arg;
+  const void    *arg              = first_arg;
 
   va_start (varg, first_arg);
 
@@ -496,7 +498,7 @@ babl_format_get_n_components (const Babl *format)
   return 0;
 }
 
-Babl *
+const Babl *
 babl_format_get_type (const Babl *format,
                       int         component_index)
 {
@@ -510,9 +512,9 @@ babl_format_get_type (const Babl *format,
   return NULL;
 }
 
-Babl *
-babl_format_with_model_as_type (Babl *model,
-                                Babl *type)
+const Babl *
+babl_format_with_model_as_type (const Babl *model,
+                                const Babl *type)
 {
   BablComponent *component[10];
   int            i;
@@ -559,7 +561,7 @@ test_create (void)
 }
 
 double
-babl_format_loss (Babl *babl)
+babl_format_loss (const Babl *babl)
 {
   double  loss = 0.0;
   double *test;
@@ -568,10 +570,10 @@ babl_format_loss (Babl *babl)
   void   *destination;
   double *transformed;
 
-  Babl   *ref_fmt;
-  Babl   *fmt;
-  Babl   *fish_to;
-  Babl   *fish_from;
+  const Babl *ref_fmt;
+  const Babl *fmt;
+  Babl       *fish_to;
+  Babl       *fish_from;
 
   ref_fmt = babl_format_new (
     babl_model ("RGBA"),
@@ -613,8 +615,42 @@ babl_format_loss (Babl *babl)
   babl_free (transformed);
   babl_free (test);
 
-  babl->format.loss = loss;
+  ((Babl*)babl)->format.loss = loss;
   return loss;
 }
 
+
+void *
+babl_get_user_data (const Babl *babl)
+{
+  switch (babl->instance.class_type)
+    {
+      case BABL_MODEL:
+        return babl->model.data;
+      case BABL_FORMAT:
+        return babl->format.model->data;
+      default:
+        babl_fatal ("babl_get_user_data called on non-model/format");
+    }
+  babl_fatal ("eeeek");
+  return NULL;
+}
+
+void
+babl_set_user_data (const Babl *cbabl, void *data)
+{
+  Babl *babl = (Babl*) cbabl;
+  switch (cbabl->instance.class_type)
+    {
+      case BABL_MODEL:
+        babl->model.data = data;
+        break;
+      case BABL_FORMAT:
+        babl->format.model->data = data;
+        break;
+      default:
+        babl_fatal ("babl_set_user_data called on non-model/format");
+    }
+}
+
 BABL_CLASS_IMPLEMENT (format)
index 68fc87d0e62466abb1df015be9de6b273e93103a..bc78f4232c7a8bc5531607003bcf2463ebaccbab 100644 (file)
@@ -24,10 +24,11 @@ BABL_CLASS_DECLARE (format);
 typedef struct
 {
   BablInstance     instance;
-  BablList         *from_list;
+  BablList        *from_list;
   int              components;
   BablComponent  **component;
   BablType       **type;
+  void            *model_data;
   void            *image_template; /* image template for use with
                                       linear (non-planer) images */
 
@@ -40,6 +41,7 @@ typedef struct
   int              visited; /* for convenience in code while searching
                                for conversion paths */
   int              format_n; /* whether the format is a format_n type or not */
+  int              palette;
 } BablFormat;
 
 #endif
index 631fe6dab497578355f6228646abeb73560b87db..a5d4e1ff5d864a570d7fd34f9b824246f5b52716 100644 (file)
@@ -79,9 +79,10 @@ image_new (BablFormat     *format,
 }
 
 Babl *
-babl_image_from_linear (char *buffer,
-                        Babl *format)
+babl_image_from_linear (char       *buffer,
+                        const Babl *cformat)
 {
+  Babl          *format = (Babl*) cformat;
   Babl          *babl;
   BablModel     *model      = NULL;
   int            components = 0;
@@ -169,7 +170,7 @@ babl_image_from_linear (char *buffer,
 }
 
 Babl *
-babl_image_new (void *first,
+babl_image_new (const void *first,
                 ...)
 {
   va_list        varg;
index 2b7a2a8d90c43f9eb6a751a65e0b71bfc04908eb..0c93f49ee8a548f74946c390bfaa749cdf42a73f 100644 (file)
@@ -41,7 +41,7 @@ BABL_CLASS_DECLARE (image);
  *                        ...]
  *                        NULL);
  */
-Babl * babl_image_new  (void *first_component,
+Babl * babl_image_new  (const void *first_component,
                         ...) BABL_ARG_NULL_TERMINATED;
 
 typedef struct
index fbc45c369e022cb1727df77920ea6a8fa7007bc2..6f821cdf2c854f9f2aa4d653161e1642a77a9e1e 100644 (file)
@@ -69,8 +69,8 @@ Babl *   babl_conversion_find           (const void     *source,
                                          const void     *destination);
 double   babl_conversion_error          (BablConversion *conversion);
 long     babl_conversion_cost           (BablConversion *conversion);
-long     babl_conversion_process        (Babl           *conversion,
-                                         char           *source,
+long     babl_conversion_process        (const Babl     *conversion,
+                                         const char     *source,
                                          char           *destination,
                                          long            n);
 
@@ -82,8 +82,8 @@ void     babl_set_extender              (Babl           *new_extender);
 Babl   * babl_extension_quiet_log       (void);
 void     babl_extension_deinit          (void);
 
-long     babl_fish_reference_process    (Babl           *babl,
-                                         BablImage      *source,
+long     babl_fish_reference_process    (const Babl     *babl,
+                                         const BablImage*source,
                                          BablImage      *destination,
                                          long            n);
 
@@ -97,20 +97,20 @@ Babl   * babl_fish_path                 (const Babl     *source,
 int      babl_fish_get_id               (const Babl     *source,
                                          const Babl     *destination);
 
-double   babl_format_loss               (Babl           *babl);
+double   babl_format_loss               (const Babl     *babl);
 Babl   * babl_image_from_linear         (char           *buffer,
-                                         Babl           *format);
-Babl   * babl_image_double_from_image   (Babl           *source);
+                                         const Babl     *format);
+Babl   * babl_image_double_from_image   (const Babl     *source);
 
-double   babl_model_is_symmetric        (Babl           *babl);
+double   babl_model_is_symmetric        (const Babl     *babl);
 void     babl_die                       (void);
 int      babl_sanity                    (void);
 
 void     babl_core_init                 (void);
-Babl   * babl_format_with_model_as_type (Babl           *model,
-                                         Babl           *type);
+const Babl *babl_format_with_model_as_type (const Babl     *model,
+                                         const Babl     *type);
 int      babl_formats_count             (void);                                     /* should maybe be templated? */
-int      babl_type_is_symmetric         (Babl           *babl);
+int      babl_type_is_symmetric         (const Babl     *babl);
 
 /**** LOGGER ****/
 #include <stdarg.h>
@@ -220,6 +220,7 @@ babl_fatal (const char *format, ...)
 )
 
 extern int   babl_hmpf_on_name_lookups;
+extern int   babl_in_fish_path;
 extern BablMutex *babl_format_mutex;
 
 #define BABL_DEBUG_MEM 0
@@ -258,7 +259,7 @@ babl_##klass##_class_for_each (BablEachFunction  each_fun,    \
 #define BABL_CLASS_IMPLEMENT(klass)                           \
 BABL_CLASS_MINIMAL_IMPLEMENT(klass)                           \
                                                               \
-Babl *                                                        \
+const Babl *                                                  \
 babl_##klass (const char *name)                               \
 {                                                             \
   Babl *babl;                                                 \
@@ -276,7 +277,7 @@ babl_##klass (const char *name)                               \
   return babl;                                                \
 }                                                             \
                                                               \
-Babl *                                                        \
+const Babl *                                                  \
 babl_##klass##_from_id (int id)                               \
 {                                                             \
   Babl *babl;                                                 \
index df71be43b6cbfed409d1316aa60090ca26cabe77..1f7707678fb502fb2021770458ab54aed9b4312d 100644 (file)
@@ -24,7 +24,7 @@
 #include "babl-internal.h"
 #include "babl-db.h"
 
-static Babl *construct_double_format (Babl *model);
+static const Babl *construct_double_format (const Babl *model);
 
 static int
 babl_model_destroy (void *data)
@@ -93,7 +93,7 @@ is_model_duplicate (Babl *babl, int components, BablComponent **component)
 }
 
 
-Babl *
+const Babl *
 babl_model_new (void *first_argument,
                 ...)
 {
@@ -204,8 +204,8 @@ babl_model_new (void *first_argument,
   else
     {
       if (!is_model_duplicate (babl, components, component))
-        babl_fatal ("BablModel '%s' already registered "
-                    "with different components!", name);
+              babl_fatal ("BablModel '%s' already registered "
+                          "with different components!", name);
     }
 
   babl_free (name);
@@ -234,9 +234,9 @@ test_create (void)
   return test;
 }
 
-static Babl *reference_format (void)
+static const Babl *reference_format (void)
 {
-  static Babl *self = NULL;
+  static const Babl *self = NULL;
 
   if (!self)
     self = babl_format_new (
@@ -250,9 +250,9 @@ static Babl *reference_format (void)
   return self;
 }
 
-static Babl *construct_double_format (Babl *model)
+static const Babl *construct_double_format (const Babl *model)
 {
-  void *argument[44 + 1];
+  const void *argument[44 + 1];
   int   args = 0;
   int   i;
 
@@ -286,8 +286,9 @@ static Babl *construct_double_format (Babl *model)
 }
 
 double
-babl_model_is_symmetric (Babl *babl)
+babl_model_is_symmetric (const Babl *cbabl)
 {
+  Babl *babl = (Babl*)cbabl;
   double *test;
   void   *original;
   double *clipped;
@@ -295,10 +296,10 @@ babl_model_is_symmetric (Babl *babl)
   double *transformed;
   int     symmetric = 1;
 
-  Babl   *ref_fmt;
-  Babl   *fmt;
-  Babl   *fish_to;
-  Babl   *fish_from;
+  const Babl *ref_fmt;
+  const Babl *fmt;
+  Babl *fish_to;
+  Babl *fish_from;
 
   test      = test_create ();
   ref_fmt   = reference_format ();
index 0a4786be530295812983fcd20ab1d65fec6459c3..4561fdba00401cdd6e1693b6ee33c1eaa6b1dcec 100644 (file)
@@ -29,6 +29,7 @@ typedef struct
   BablComponent  **component;
   BablType       **type; /*< must be doubles,
                              used here for convenience in code */
+  void            *data; /* used for palette */
 } BablModel;
 
 #endif
diff --git a/babl/babl-palette.c b/babl/babl-palette.c
new file mode 100644 (file)
index 0000000..7e72eaa
--- /dev/null
@@ -0,0 +1,627 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2012, Øyvind Kolås.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <values.h>
+#include <assert.h>
+#include "config.h"
+#include "babl-internal.h"
+#include "babl.h"
+#include "babl-memory.h"
+
+#define HASH_TABLE_SIZE 1111
+
+/* A default palette, containing standard ANSI / EGA colors
+ *
+ */
+static unsigned char defpal_data[4*16] = 
+{  
+0  ,0  ,0  ,255,
+127,0  ,0  ,255,
+0  ,127,0  ,255,
+127,127,0  ,255,
+0  ,0  ,127,255,
+127,0  ,127,255,
+0  ,127,127,255,
+127,127,127,255,
+63 ,63 ,63 ,255,
+255,0  ,0  ,255,
+0  ,255,0  ,255,
+255,255,0  ,255,
+0  ,0  ,255,255,
+255,0  ,255,255,
+0  ,255,255,255,
+255,255,255,255,
+};
+static double defpal_double[4*8*16];
+
+
+typedef struct BablPalette
+{
+  int         count; /* number of palette entries */
+  const Babl *format;/* the pixel format the palette is stored in */
+  unsigned char *data;  /* one linear segment of all the pixels representing the palette, in   order */
+  double        *data_double;
+  unsigned char *data_u8;
+  int          hash[HASH_TABLE_SIZE];
+  unsigned int hashpx[HASH_TABLE_SIZE];
+} BablPalette;
+
+static void
+babl_palette_reset_hash (BablPalette *pal)
+{
+  int i;
+  for (i = 0; i < HASH_TABLE_SIZE; i++)
+    {
+      pal->hashpx[i] = ((255 << 16) | (255 << 8) | 255) + 11; /* non existant pixel */
+      pal->hash[i] = -1;
+    }
+}
+
+static int
+babl_palette_lookup (BablPalette *pal, int r, int g, int b, int a)
+{
+  unsigned int pixel      = (r << 16) | (g << 8) | b;
+  int          hash_index = pixel % HASH_TABLE_SIZE;
+  int          idx = pal->hash[hash_index];
+  
+  if (idx >= 0 &&
+      pal->hashpx[hash_index] == pixel)
+    {
+      return idx;
+    }
+  else
+    {
+      int best_idx = 0;
+      int best_diff = INT_MAX;
+
+      for (idx = 0; idx < pal->count; idx++)
+        {
+          unsigned char *palpx = pal->data_u8 + idx * 4;
+          int pr = palpx[0];
+          int pg = palpx[1];
+          int pb = palpx[2];
+
+          int diff = (r - pr) * (r - pr) +
+                     (g - pg) * (g - pg) +
+                     (b - pb) * (b - pb);
+          if (diff < best_diff)
+            {
+              best_diff = diff;
+              best_idx  = idx;
+            }
+        }
+      pal->hash[hash_index] = best_idx;
+      pal->hashpx[hash_index] = pixel;
+      return best_idx;
+    }
+  return 0;
+}
+
+static BablPalette *make_pal (const Babl *format, const void *data, int count)
+{
+  BablPalette *pal = NULL;
+  int bpp = babl_format_get_bytes_per_pixel (format);
+
+  pal = babl_malloc (sizeof (BablPalette));
+  pal->count = count;
+  pal->format = format;
+  pal->data = babl_malloc (bpp * count);
+  pal->data_double = babl_malloc (4 * sizeof(double) * count);
+  pal->data_u8 = babl_malloc (4 * sizeof(char) * count);
+  memcpy (pal->data, data, bpp * count);
+
+  babl_process (babl_fish (format, babl_format ("RGBA double")),
+                data, pal->data_double, count);
+  babl_process (babl_fish (format, babl_format ("RGBA u8")),
+                data, pal->data_u8, count);
+
+  babl_palette_reset_hash (pal);
+
+  return pal;
+}
+
+static void babl_palette_free (BablPalette *pal)
+{
+  babl_free (pal->data);
+  babl_free (pal->data_double);
+  babl_free (pal->data_u8);
+  babl_free (pal);
+}
+
+static BablPalette *default_palette (void)
+{
+  static BablPalette pal;
+  static int inited = 0;
+  if (inited)
+    return &pal;
+  memset (&pal, 0, sizeof (pal));
+  inited = 1;
+  pal.count = 16;
+  pal.format = babl_format ("RGBA u8"); /* dynamically generated, so
+                                           the default palette can
+                                           not be fully static.
+                                         */
+  pal.data = defpal_data;
+  pal.data_double = defpal_double;
+  pal.data_u8 = defpal_data;
+
+  babl_process (babl_fish (pal.format, babl_format ("RGBA double")),
+                pal.data, pal.data_double, pal.count);
+
+  babl_palette_reset_hash (&pal);
+  return &pal;
+}
+
+static long
+rgba_to_pal (char *src,
+             char *dst,
+             long  n,
+             void *dst_model_data)
+{
+  BablPalette **palptr = dst_model_data;
+  BablPalette *pal = *palptr;
+  while (n--)
+    {
+      int idx;
+
+      int best_idx = 0;
+      double best_diff = 100000;
+      double *srcf;
+
+      srcf = ((double *) src);
+
+      for (idx = 0; idx<pal->count; idx++)
+        {
+          double diff;
+          double *palpx = ((double *)pal->data_double) + idx * 4;
+
+          diff = (palpx[0] - srcf[0]) * (palpx[0] - srcf[0]) +
+                 (palpx[1] - srcf[1]) * (palpx[1] - srcf[1]) +
+                 (palpx[2] - srcf[2]) * (palpx[2] - srcf[2]);
+          if (diff <= best_diff)
+            {
+              best_diff = diff;
+              best_idx = idx;
+            }
+        }
+
+      ((double *) dst)[0] = best_idx / 255.5;
+
+      src += sizeof (double) * 4;
+      dst += sizeof (double) * 1;
+    }
+  return n;
+}
+
+static long
+rgba_to_pala (char *src,
+              char *dst,
+              long  n,
+              void *dst_model_data)
+{
+  BablPalette **palptr = dst_model_data;
+  BablPalette *pal = *palptr;
+  
+  assert(pal);
+  while (n--)
+    {
+      int idx;
+
+      int best_idx = 0;
+      double best_diff = 100000;
+      double *srcf;
+      double alpha;
+
+      srcf = ((double *) src);
+      alpha = srcf[3];
+
+      for (idx = 0; idx<pal->count; idx++)
+        {
+          double diff;
+          double *palpx = ((double *)pal->data_double) + idx * 4;
+
+          diff = (palpx[0] - srcf[0]) * (palpx[0] - srcf[0]) +
+                 (palpx[1] - srcf[1]) * (palpx[1] - srcf[1]) +
+                 (palpx[2] - srcf[2]) * (palpx[2] - srcf[2]);
+          if (diff <= best_diff)
+            {
+              best_diff = diff;
+              best_idx = idx;
+            }
+        }
+
+      ((double *) dst)[0] = best_idx / 255.5;
+      ((double *) dst)[1] = alpha;
+
+      src += sizeof (double) * 4;
+      dst += sizeof (double) * 2;
+    }
+  return n;
+}
+
+static long
+pal_to_rgba (char *src,
+             char *dst,
+             long  n,
+             void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal = *palptr;
+  assert(pal);
+  while (n--)
+    {
+      int idx = (((double *) src)[0]) * 255.5;
+      double *palpx;
+
+      if (idx < 0) idx = 0;
+      if (idx >= pal->count) idx = pal->count-1;
+
+      palpx = ((double *)pal->data_double) + idx * 4;
+      memcpy (dst, palpx, sizeof(double)*4);
+
+      src += sizeof (double) * 1;
+      dst += sizeof (double) * 4;
+    }
+  return n;
+}
+
+static long
+pala_to_rgba (char *src,
+              char *dst,
+              long  n,
+              void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal = *palptr;
+
+  assert(pal);
+  while (n--)
+    {
+      int idx      = (((double *) src)[0]) * 255.5;
+      double alpha = (((double *) src)[1]);
+      double *palpx;
+
+      if (idx < 0) idx = 0;
+      if (idx >= pal->count) idx = pal->count-1;
+
+      palpx = ((double *)pal->data_double) + idx * 4;
+      memcpy (dst, palpx, sizeof(double)*4);
+
+      ((double *)dst)[3] *= alpha; 
+
+      src += sizeof (double) * 2;
+      dst += sizeof (double) * 4;
+    }
+  return n;
+}
+
+static long
+rgba_u8_to_pal (unsigned char *src,
+                unsigned char *dst,
+                long  n,
+                void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal;
+  assert (palptr);
+  pal = *palptr;
+  assert(pal);
+  while (n--)
+    {
+      dst[0] = babl_palette_lookup (pal, src[0], src[1], src[2], src[3]);
+
+      src += sizeof (char) * 4;
+      dst += sizeof (char) * 1;
+    }
+
+  return n;
+}
+
+static long
+rgba_u8_to_pal_a (char *src,
+                  char *dst,
+                  long  n,
+                  void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal;
+  assert (palptr);
+  pal = *palptr;
+  assert(pal);
+  while (n--)
+    {
+      dst[0] = babl_palette_lookup (pal, src[0], src[1], src[2], src[3]);
+      dst[1] = src[3];
+
+      src += sizeof (char) * 4;
+      dst += sizeof (char) * 2;
+    }
+  return n;
+}
+
+static long
+pal_u8_to_rgba_u8 (char *src,
+                   char *dst,
+                   long  n,
+                   void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal;
+  assert (palptr);
+  pal = *palptr;
+  assert(pal);
+  while (n--)
+    {
+      int idx = (((unsigned char *) src)[0]);
+      unsigned char *palpx;
+
+      if (idx < 0) idx = 0;
+      if (idx >= pal->count) idx = pal->count-1;
+
+      palpx = ((unsigned char*)pal->data_u8) + idx * 4;
+      memcpy (dst, palpx, sizeof(char)*4);
+
+      src += sizeof (char) * 1;
+      dst += sizeof (char) * 4;
+    }
+  return n;
+}
+
+static long
+pala_u8_to_rgba_u8 (char *src,
+                    char *dst,
+                    long  n,
+                    void *src_model_data)
+{
+  BablPalette **palptr = src_model_data;
+  BablPalette *pal;
+  assert (palptr);
+  pal = *palptr;
+  assert(pal);
+  while (n--)
+    {
+      int idx = (((unsigned char *) src)[0]);
+      unsigned char *palpx;
+
+      if (idx < 0) idx = 0;
+      if (idx >= pal->count) idx = pal->count-1;
+
+      palpx = ((unsigned char*)pal->data_u8) + idx * 4;
+      memcpy (dst, palpx, sizeof(char)*4);
+      dst[3] = (dst[3] * src[1]) >> 8;
+
+      src += sizeof (char) * 2;
+      dst += sizeof (char) * 4;
+    }
+  return n;
+}
+
+
+#include "base/util.h"
+
+static inline long
+conv_pal8_pala8 (unsigned char *src, unsigned char *dst, long samples)
+{
+  long n = samples;
+
+  while (n--)
+    {
+      dst[0] = src[0];
+      dst[1] = 255;
+      src   += 1;
+      dst   += 2;
+    }
+  return samples;
+}
+
+static inline long
+conv_pala8_pal8 (unsigned char *src, unsigned char *dst, long samples)
+{
+  long n = samples;
+
+  while (n--)
+    {
+      dst[0] = src[0];
+      src   += 2;
+      dst   += 1;
+    }
+  return samples;
+}
+
+int
+babl_format_is_palette (const Babl *format)
+{
+  if (format->class_type == BABL_FORMAT)
+    return format->format.palette;
+  return 0;
+}
+
+/* should return the BablModel, permitting to fetch
+ * other formats out of it?
+ */
+const Babl *babl_new_palette (const char  *name,
+                              const Babl **format_u8,
+                              const Babl **format_u8_with_alpha)
+{
+  const Babl *model;
+  const Babl *model_no_alpha;
+  Babl *f_pal_u8;
+  Babl *f_pal_a_u8;
+  const Babl *component;
+  const Babl *alpha;
+  BablPalette **palptr;
+
+  char  cname[64];
+
+  if (!name)
+    {
+      static int cnt = 0;
+      sprintf (cname, "_babl-int-%i", cnt++);
+      name = cname;
+    }
+  else
+    {
+      strcpy (cname, name);
+      name = cname;
+
+      if ((model = babl_db_exist_by_name (babl_model_db (), name)))
+        {
+          cname[0] = ')';
+          if (format_u8)
+            *format_u8 = babl_db_exist_by_name (babl_format_db (), name);
+          cname[0] = '\\';
+          if (format_u8_with_alpha)
+            *format_u8_with_alpha = babl_db_exist_by_name (babl_format_db (), name);
+          return model;
+        }
+    }
+
+  /* re-registering is a no-op */
+  component = babl_component_new (
+    "I",
+    "luma",
+    "chroma",
+    NULL);
+  alpha = babl_component ("A");
+  
+  model = babl_model_new ("name", name, component, alpha, NULL);
+  palptr = malloc (sizeof (void*));
+  *palptr = default_palette ();;
+  cname[0] = 'v';
+  model_no_alpha = babl_model_new ("name", name, component, NULL);
+  cname[0] = '\\';
+  f_pal_a_u8 = (void*) babl_format_new ("name", name, model,
+                                babl_type ("u8"),
+                                component, alpha, NULL);
+  cname[0] = ')';
+  f_pal_u8  = (void*) babl_format_new ("name", name, model_no_alpha,
+                               babl_type ("u8"),
+                               component, NULL);
+
+  f_pal_a_u8->format.palette = 1;
+  f_pal_u8->format.palette = 1;
+
+  babl_conversion_new (
+     model,
+     babl_model ("RGBA"),
+     "linear", pala_to_rgba,
+     "data", palptr,
+     NULL
+  );
+
+  babl_conversion_new (
+     babl_model ("RGBA"),
+     model,
+     "linear", rgba_to_pala,
+     "data", palptr,
+     NULL
+  );
+
+  babl_conversion_new (
+     model_no_alpha,
+     babl_model ("RGBA"),
+     "linear", pal_to_rgba,
+     "data", palptr,
+     NULL
+  );
+  babl_conversion_new (
+     babl_model ("RGBA"),
+     model_no_alpha,
+     "linear", rgba_to_pal,
+     "data", palptr,
+     NULL
+  );
+
+  babl_conversion_new (
+     f_pal_u8,
+     f_pal_a_u8,
+     "linear", conv_pal8_pala8,
+     NULL
+  );
+
+  babl_conversion_new (
+     f_pal_a_u8,
+     f_pal_u8,
+     "linear", conv_pala8_pal8,
+     NULL
+  );
+
+
+  babl_conversion_new (
+     f_pal_u8,
+     babl_format ("RGBA u8"),
+     "linear", pal_u8_to_rgba_u8,
+     "data", palptr,
+     NULL);
+
+
+  babl_conversion_new (
+     f_pal_a_u8,
+     babl_format ("RGBA u8"),
+     "linear", pala_u8_to_rgba_u8,
+     "data", palptr,
+     NULL);
+
+  babl_conversion_new (
+     babl_format ("RGBA u8"),
+     f_pal_a_u8,
+     "linear", rgba_u8_to_pal_a,
+     "data", palptr,
+     NULL);
+  babl_conversion_new (
+     babl_format ("RGBA u8"),
+     f_pal_u8,
+     "linear", rgba_u8_to_pal,
+     "data", palptr,
+     NULL);
+
+  babl_set_user_data (model, palptr);
+  babl_set_user_data (model_no_alpha, palptr);
+
+  if (format_u8)
+    *format_u8 = f_pal_u8;
+  if (format_u8_with_alpha)
+    *format_u8_with_alpha = f_pal_a_u8;
+  babl_sanity ();
+  return model;
+}
+
+void
+babl_palette_set_palette (const Babl *babl,
+                          const Babl *format,
+                          void       *data,
+                          int         count)
+{
+  BablPalette **palptr = babl_get_user_data (babl);
+  babl_palette_reset (babl);
+  *palptr = make_pal (format, data, count);
+}
+
+void
+babl_palette_reset (const Babl *babl)
+{
+  BablPalette **palptr = babl_get_user_data (babl);
+  if (*palptr != default_palette ())
+    {
+      babl_palette_free (*palptr);
+    }
+  *palptr = default_palette ();
+}
index d2e43d61b9a8a49823919505ffbae92325069e63..15b6532f29416fef531c7b2f435bc1fb14199064 100644 (file)
@@ -27,7 +27,7 @@
 static BablSampling sampling_db[(HORIZONTAL_MAX - HORIZONTAL_MIN + 1) *
                                 (VERTICAL_MAX - VERTICAL_MIN + 1)];
 
-Babl *
+const Babl *
 babl_sampling (int horizontal,
                int vertical)
 {
index b8388604b2308c12005fc1f1080681bf271d1dec..9c3a3e8d7bb0e378be5c18b061b2279fb966c805 100644 (file)
@@ -65,7 +65,7 @@ is_type_duplicate (Babl *babl, int bits)
   return 1;
 }
 
-Babl *
+const Babl *
 babl_type_new (void *first_arg,
                ...)
 {
@@ -162,6 +162,9 @@ babl_type_new (void *first_arg,
    */
   babl_db_insert (db, babl);
   return babl;
+
+  if (min || max || is_integer || max_val || min_val)
+    return NULL;
 }
 
 
@@ -193,9 +196,9 @@ static void test_init (double min, double max)
 }
 
 
-static Babl *double_vector_format (void)
+static const Babl *double_vector_format (void)
 {
-  static Babl *self = NULL;
+  static const Babl *self = NULL;
 
   if (!self)
     self = babl_format_new (
@@ -207,7 +210,7 @@ static Babl *double_vector_format (void)
 }
 
 int
-babl_type_is_symmetric (Babl *babl)
+babl_type_is_symmetric (const Babl *babl)
 {
   int     is_symmetrical = 1;
   void   *original;
@@ -215,10 +218,10 @@ babl_type_is_symmetric (Babl *babl)
   void   *destination;
   double *transformed;
 
-  Babl   *ref_fmt;
-  Babl   *fmt;
-  Babl   *fish_to;
-  Babl   *fish_from;
+  const Babl *ref_fmt;
+  const Babl *fmt;
+  Babl       *fish_to;
+  Babl       *fish_from;
 
   test_init (0.0, 182.0);
 
index 162e6c9a25185dedd55bd38efc6ae9897a3edaa3..9729e0480f85d241db192b5e7c7d924c568bd8d0 100644 (file)
@@ -33,17 +33,19 @@ typedef union _Babl Babl;
 /* Conversion function between linear data of a either a data types or
  * color formats.
  */
-typedef long (*BablFuncLinear)    (char  *src,
+typedef long (*BablFuncLinear)    (const char  *src,
                                    char  *dst,
-                                   long   n);
+                                   long   n,
+                                   void  *user_data);
 
 /* TypePlanar,ModelPlanar and FormatPlanar */
 typedef long (*BablFuncPlanar)    (int    src_bands,
-                                   char  *src[],
+                                   const char  *src[],
                                    int    src_pitch[],
                                    int    dst_bands,
                                    char  *dst[],
                                    int    dst_pitch[],
-                                   long   n);
+                                   long   n,
+                                   void  *user_data);
 
 #endif
index 90869538243f9710b219e82a3eb6f973f6889162..f8025b2db1f8d4042f4d64cf60dee7eeae739f08 100644 (file)
@@ -34,7 +34,7 @@
 
 #define BABL_MAJOR_VERSION 0
 #define BABL_MINOR_VERSION 1
-#define BABL_MICRO_VERSION 6
+#define BABL_MICRO_VERSION 8
 
 /** Get the version information on the babl library */
 void   babl_get_version (int *major,
index 2c248a5b3e20f43e97451a93ef2c843e838c1b79..5e6cf42ff787bec3eb5ee9b1b406070d4481c95f 100644 (file)
@@ -45,46 +45,46 @@ void         babl_exit      (void);
  * Returns the babl object representing the data type given by @name
  * such as for example "u8", "u16" or "float".
  */
-Babl *       babl_type      (const char *name);
+const Babl * babl_type      (const char *name);
 
 /**
  * Returns the babl object representing the @horizontal and @vertical
  * sampling such as for example 2, 2 for the chroma components in
  * YCbCr.
  */
-Babl *       babl_sampling  (int horizontal,
+const Babl * babl_sampling  (int horizontal,
                              int vertical);
 
 /**
  * Returns the babl object representing the color component given by
  * @name such as for example "R", "cyan" or "CIE L".
  */
-Babl *       babl_component (const char *name);
+const Babl * babl_component (const char *name);
 
 /**
  * Returns the babl object representing the color model given by @name
  * such as for example "RGB", "CMYK" or "CIE Lab".
  */
-Babl *       babl_model     (const char *name);
+const Babl * babl_model     (const char *name);
 
 /**
  * Returns the babl object representing the color format given by
  * @name such as for example "RGB u8", "CMYK float" or "CIE Lab u16".
  */
-Babl *       babl_format    (const char *name);
+const Babl * babl_format    (const char *name);
 
 /*  Create a babl fish capable of converting from source_format to
  *  destination_format, source and destination can be either strings
  *  with the names of the formats or Babl-format objects.
  */
-Babl *       babl_fish      (const void *source_format,
+const Babl * babl_fish      (const void *source_format,
                              const void *destination_format);
 
 /** Process n pixels from source to destination using babl_fish,
  *  returns number of pixels converted.
  */
-long         babl_process   (Babl *babl_fish,
-                             void *source,
+long         babl_process   (const Babl *babl_fish,
+                             const void *source,
                              void *destination,
                              long  n);
 
@@ -113,7 +113,7 @@ int          babl_format_get_n_components      (const Babl *format);
  * Returns the type in the given @format for the given
  * @component_index.
  */
-Babl *       babl_format_get_type              (const Babl *format,
+const Babl * babl_format_get_type              (const Babl *format,
                                                 int         component_index);
 
 
@@ -128,7 +128,7 @@ Babl *       babl_format_get_type              (const Babl *format,
  *                          ["max_val", double max_val,]
  *                          NULL);
  */
-Babl * babl_type_new       (void *first_arg,
+const Babl * babl_type_new (void *first_arg,
                             ...) BABL_ARG_NULL_TERMINATED;
 
 /**
@@ -137,8 +137,8 @@ Babl * babl_type_new       (void *first_arg,
  *     babl_component_new  (const char *name,
  *                          NULL);
  */
-Babl * babl_component_new  (void *first_arg,
-                            ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_component_new  (void *first_arg,
+                                  ...) BABL_ARG_NULL_TERMINATED;
 
 /**
  * Defines a new color model in babl. If no name is provided a name is
@@ -149,7 +149,7 @@ Babl * babl_component_new  (void *first_arg,
  *                          [BablComponent *componentN, ...]
  *                          NULL);
  */
-Babl * babl_model_new      (void *first_arg,
+const Babl * babl_model_new (void *first_arg,
                             ...) BABL_ARG_NULL_TERMINATED;
 
 /**
@@ -169,8 +169,8 @@ Babl * babl_model_new      (void *first_arg,
  *                          ["planar",]
  *                          NULL);
  */
-Babl * babl_format_new     (void *first_arg,
-                            ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_format_new (const void *first_arg,
+                              ...) BABL_ARG_NULL_TERMINATED;
 
 /*
  * Defines a new pixel format in babl. With the specified data storage
@@ -178,14 +178,14 @@ Babl * babl_format_new     (void *first_arg,
  * conversions are only well defined to other babl_format_n derived formats
  * with the same number of components.
  */
-Babl *
-babl_format_n (Babl *type,
+const Babl *
+babl_format_n (const Babl *type,
                int   components);
 
 /**
  * Returns whether the @format is a format_n type.
  */
-int babl_format_is_format_n (Babl *format);
+int babl_format_is_format_n (const Babl *format);
 
 /**
  * Defines a new conversion between either two formats, two models or
@@ -197,8 +197,56 @@ int babl_format_is_format_n (Babl *format);
  *                          <"linear"|"planar">, <BablFuncLinear | BablFuncPlanar> conv_func,
  *                          NULL);
  */
-Babl * babl_conversion_new (void *first_arg,
-                            ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_conversion_new (const void *first_arg,
+                                  ...) BABL_ARG_NULL_TERMINATED;
+
+
+/**
+ * create a new palette based format, name is optional pass in NULL to get
+ * an anonymous format. If you pass in with_alpha the format also gets
+ * an 8bit alpha channel. Returns the BablModel of the color model. If
+ * you pass in the same name the previous formats will be provided
+ * again.
+ */
+const Babl *babl_new_palette (const char  *name,
+                              const Babl **format_u8,
+                              const Babl **format_u8_with_alpha);
+
+/**
+ * check whether a format is a palette backed format.
+ */
+int   babl_format_is_palette   (const Babl *format);
+
+/**
+ * Assign a palette to a palette format, the data is a single span of pixels
+ * representing the colors of the palette.
+ */
+void  babl_palette_set_palette (const Babl        *babl,
+                                const Babl        *format,
+                                void              *data,
+                                int                count);
+
+/**
+ * reset a palette to initial state, frees up some caches that optimize
+ * conversions.
+ */
+void  babl_palette_reset       (const Babl        *babl);
+
+
+
+/**
+ * associate a data pointer with a format/model, this data can be accessed and
+ * used from the conversion functions, encoding color profiles, palettes or
+ * similar with the data, perhaps this should be made internal API, not
+ * accesible at all from
+ */
+void   babl_set_user_data     (const Babl *babl, void *data);
+
+/**
+ * get data set with babl_set_user_data
+ */
+void * babl_get_user_data     (const Babl *babl);
+
 
 
 /*
index a08d93cc8f88d51ded7a334b15864c830729c964..8df47d247336821f9309dfa3ff7025272c817dde 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -57,8 +57,8 @@ am__objects_2 = babl-base.lo formats.lo type-float.lo type-u8.lo \
        model-ycbcr.lo
 am_libbase_la_OBJECTS = $(am__objects_1) $(am__objects_2)
 libbase_la_OBJECTS = $(am_libbase_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -70,21 +70,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
 am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(libbase_la_SOURCES)
 DIST_SOURCES = $(libbase_la_SOURCES)
@@ -307,7 +307,7 @@ clean-noinstLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) 
+libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) $(EXTRA_libbase_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK)  $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
@@ -329,26 +329,23 @@ distclean-compile:
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -452,10 +449,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 57d4cebafd1da73a6ebe3d6763a5dbb8149dfb28..bed3c64473c2b2540d481539e3f62116d5d645c9 100644 (file)
@@ -28,6 +28,7 @@ void babl_base_type_u8     (void);
 void babl_base_type_u16    (void);
 void babl_base_type_u32    (void);
 
+void babl_base_model_pal   (void);
 void babl_base_model_rgb   (void);
 void babl_base_model_gray  (void);
 void babl_base_model_ycbcr (void);
index 40eaed4821ec09567afae2b5e90cdc7aa2a55082..d622a44e551f209d5e8c5462b3fe53a162f7b330 100755 (executable)
@@ -2,9 +2,9 @@
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2011-05-11'
+timestamp='2012-02-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2011-05-11'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
        # switched to ELF, *-*-netbsd* would select the old
        # object file format.  This provides both forward
@@ -792,13 +790,12 @@ EOF
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
     *:FreeBSD:*:*)
-       case ${UNAME_MACHINE} in
-           pc98)
-               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       UNAME_PROCESSOR=`/usr/bin/uname -p`
+       case ${UNAME_PROCESSOR} in
            amd64)
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
            *)
-               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
        esac
        exit ;;
     i*:CYGWIN*:*)
@@ -807,6 +804,9 @@ EOF
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
+    i*:MSYS*:*)
+       echo ${UNAME_MACHINE}-pc-msys
+       exit ;;
     i*:windows32*:*)
        # uname -m includes "-pc" on this system.
        echo ${UNAME_MACHINE}-mingw32
@@ -861,6 +861,13 @@ EOF
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
        exit ;;
+    aarch64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    aarch64_be:Linux:*:*)
+       UNAME_MACHINE=aarch64_be
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -895,13 +902,16 @@ EOF
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     cris:Linux:*:*)
-       echo cris-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     crisv32:Linux:*:*)
-       echo crisv32-axis-linux-gnu
+       echo ${UNAME_MACHINE}-axis-linux-gnu
        exit ;;
     frv:Linux:*:*)
-       echo frv-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    hexagon:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     i*86:Linux:*:*)
        LIBC=gnu
@@ -943,7 +953,7 @@ EOF
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
-       echo or32-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     padre:Linux:*:*)
        echo sparc-unknown-linux-gnu
@@ -978,13 +988,13 @@ EOF
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-tilera-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     vax:Linux:*:*)
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-unknown-linux-gnu
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1315,6 +1325,9 @@ EOF
     i*86:AROS:*:*)
        echo ${UNAME_MACHINE}-pc-aros
        exit ;;
+    x86_64:VMkernel:*:*)
+       echo ${UNAME_MACHINE}-unknown-esx
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
index 30fdca81215f7b8a3e71430dc026507740b2c900..c894da45500c4af1bf5688e713a8895622d18182 100755 (executable)
@@ -2,9 +2,9 @@
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011 Free Software Foundation, Inc.
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2011-03-23'
+timestamp='2012-02-10'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2011-03-23'
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -76,8 +74,8 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -132,6 +130,10 @@ case $maybe_os in
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -247,17 +249,22 @@ case $basic_machine in
        # Some are omitted here because they have special meanings below.
        1750a | 580 \
        | a29k \
+       | aarch64 | aarch64_be \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
        | am33_2.0 \
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
        | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
+       | epiphany \
        | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
        | maxq | mb | microblaze | mcore | mep | metag \
@@ -291,7 +298,7 @@ case $basic_machine in
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
-       | rx \
+       | rl78 | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
@@ -300,7 +307,7 @@ case $basic_machine in
        | spu \
        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
-       | v850 | v850e \
+       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | we32k \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
@@ -315,8 +322,7 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-               # Motorola 68HC11/12.
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -329,7 +335,10 @@ case $basic_machine in
        strongarm | thumb | xscale)
                basic_machine=arm-unknown
                ;;
-
+       xgate)
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
        xscaleeb)
                basic_machine=armeb-unknown
                ;;
@@ -352,11 +361,13 @@ case $basic_machine in
        # Recognize the basic CPU types with company name.
        580-* \
        | a29k-* \
+       | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
+       | be32-* | be64-* \
        | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
@@ -365,8 +376,10 @@ case $basic_machine in
        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -400,7 +413,7 @@ case $basic_machine in
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
        | pyramid-* \
-       | romp-* | rs6000-* | rx-* \
+       | rl78-* | romp-* | rs6000-* | rx-* \
        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -408,10 +421,11 @@ case $basic_machine in
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
        | tahoe-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tile-* | tilegx-* \
+       | tile*-* \
        | tron-* \
        | ubicom32-* \
-       | v850-* | v850e-* | vax-* \
+       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+       | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -711,7 +725,6 @@ case $basic_machine in
        i370-ibm* | ibm*)
                basic_machine=i370-ibm
                ;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
        i*86v32)
                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                os=-sysv32
@@ -808,10 +821,18 @@ case $basic_machine in
        ms1-*)
                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                ;;
+       msys)
+               basic_machine=i386-pc
+               os=-msys
+               ;;
        mvs)
                basic_machine=i370-ibm
                os=-mvs
                ;;
+       nacl)
+               basic_machine=le32-unknown
+               os=-nacl
+               ;;
        ncr3000)
                basic_machine=i486-ncr
                os=-sysv4
@@ -1120,13 +1141,8 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       # This must be matched before tile*.
-       tilegx*)
-               basic_machine=tilegx-unknown
-               os=-linux-gnu
-               ;;
        tile*)
-               basic_machine=tile-unknown
+               basic_machine=$basic_machine-unknown
                os=-linux-gnu
                ;;
        tx39)
@@ -1336,7 +1352,7 @@ case $os in
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1548,9 +1564,6 @@ case $basic_machine in
                ;;
        m68000-sun)
                os=-sunos3
-               # This also exists in the configure program, but was not the
-               # default.
-               # os=-sunos4
                ;;
        m68*-cisco)
                os=-aout
index 66b46691250104caad752221f5ecbd8c9df82ead..d96bf91811026c9518ee52bd7b17176dfe22b651 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for babl 0.1.6.
+# Generated by GNU Autoconf 2.68 for babl 0.1.8.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='babl'
 PACKAGE_TARNAME='babl'
-PACKAGE_VERSION='0.1.6'
-PACKAGE_STRING='babl 0.1.6'
+PACKAGE_VERSION='0.1.8'
+PACKAGE_STRING='babl 0.1.8'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -671,6 +671,7 @@ CPP
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -686,6 +687,8 @@ CFLAGS
 CC
 AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
 am__untar
 am__tar
 AMTAR
@@ -1350,7 +1353,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures babl 0.1.6 to adapt to many kinds of systems.
+\`configure' configures babl 0.1.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1420,7 +1423,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of babl 0.1.6:";;
+     short | recursive ) echo "Configuration of babl 0.1.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1536,7 +1539,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-babl configure 0.1.6
+babl configure 0.1.8
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1901,7 +1904,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by babl $as_me 0.1.6, which was
+It was created by babl $as_me 0.1.8, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2257,11 +2260,11 @@ ac_config_headers="$ac_config_headers config.h"
 
 BABL_MAJOR_VERSION=0
 BABL_MINOR_VERSION=1
-BABL_MICRO_VERSION=6
+BABL_MICRO_VERSION=8
 BABL_INTERFACE_AGE=1
-BABL_BINARY_AGE=106
-BABL_VERSION=0.1.6
-BABL_REAL_VERSION=0.1.6
+BABL_BINARY_AGE=108
+BABL_VERSION=0.1.8
+BABL_REAL_VERSION=0.1.8
 BABL_API_VERSION=0.1
 
 
@@ -2403,7 +2406,7 @@ fi
 if test "${enable_introspection+set}" = set; then :
   enableval=$enable_introspection;
 else
-  enable_introspection=auto
+  enable_introspection=no
 fi
 
 
@@ -2582,7 +2585,7 @@ fi
 
 
 
-BABL_LIBRARY_VERSION="105:1:105"
+BABL_LIBRARY_VERSION="107:1:107"
 BABL_CURRENT_MINUS_AGE=0
 
 
@@ -3055,7 +3058,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='babl'
- VERSION='0.1.6'
+ VERSION='0.1.8'
 
 
 # Some tools Automake needs.
@@ -3076,11 +3079,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3100,6 +3103,33 @@ yes) AM_DEFAULT_VERBOSITY=0;;
 no)  AM_DEFAULT_VERBOSITY=1;;
 *)   AM_DEFAULT_VERBOSITY=0;;
 esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+       @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
 AM_BACKSLASH='\'
 
 
@@ -3155,6 +3185,7 @@ fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3968,6 +3999,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4027,7 +4059,7 @@ else
        break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -4865,6 +4897,7 @@ else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4924,7 +4957,7 @@ else
        break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -12735,8 +12768,8 @@ CC="$lt_save_CC"
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to disable maintainer-specific portions of Makefiles... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
     # Check whether --enable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then :
   enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
@@ -14452,7 +14485,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by babl $as_me 0.1.6, which was
+This file was extended by babl $as_me 0.1.8, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14518,7 +14551,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-babl config.status 0.1.6
+babl config.status 0.1.8
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
index d5ed3b52d934e3da32d2c4ddf536f1505d453fdb..3d9974aa64c4353de5a78943b6eb2be6dde84c67 100644 (file)
@@ -14,7 +14,7 @@ AC_PREREQ(2.54)
 
 m4_define([babl_major_version], [0])
 m4_define([babl_minor_version], [1])
-m4_define([babl_micro_version], [6])
+m4_define([babl_micro_version], [8])
 m4_define([babl_real_version],
           [babl_major_version.babl_minor_version.babl_micro_version])
 m4_define([babl_version], [babl_real_version])
diff --git a/depcomp b/depcomp
index df8eea7e4ce8862105fcd7929b20bdb45488048b..bd0ac089584a762069b7e0b3f2937e89b9144cc7 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-12-04.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ Environment variables:
   object      Object file output by `PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
-  tmpdepfile  Temporary file to use when outputing dependencies.
+  tmpdepfile  Temporary file to use when outputting dependencies.
   libtool     Whether libtool is used (yes/no).
 
 Report bugs to <bug-automake@gnu.org>.
@@ -90,10 +90,18 @@ if test "$depmode" = msvcmsys; then
    # This is just like msvisualcpp but w/o cygpath translation.
    # Just convert the backslash-escaped backslashes to single forward
    # slashes to satisfy depend.m4
-   cygpath_u="sed s,\\\\\\\\,/,g"
+   cygpath_u='sed s,\\\\,/,g'
    depmode=msvisualcpp
 fi
 
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -158,10 +166,12 @@ gcc)
 ' < "$tmpdepfile" |
 ## Some versions of gcc put a space before the `:'.  On the theory
 ## that the space means something, we add a space to the output as
-## well.
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -405,6 +415,52 @@ tru64)
    rm -f "$tmpdepfile"
    ;;
 
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/      \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/        /
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 #nosideeffect)
   # This comment above is used by automake to tell side-effect
   # dependency tracking mechanisms from slower ones.
@@ -503,7 +559,9 @@ makedepend)
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
   sed '1,2d' "$tmpdepfile" | tr ' ' '
 ' | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
index c561410743e89d7fdf3008b5b4fe26e7dcbbc7b7..d12b5b2cabfa4a888747711023aaf557ccdd5c40 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -48,11 +48,11 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES = index-static.html
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
@@ -525,10 +525,15 @@ install-am: all-am
 
 installcheck: installcheck-recursive
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 7fa6eeea895f1189885e533be8c5acedbeed344a..cfd47fcf74428254f5540fb7951ef1b6f4c7ce8f 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -47,11 +47,11 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
@@ -324,10 +324,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index e8ad11154d66a9d2d8faa266db2351f1212f20ae..fac012330d53c255d5010ba829e5ba3fe4cdba74 100644 (file)
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
 
 extdir = $(libdir)/babl-@BABL_API_VERSION@
 ext_LTLIBRARIES = \
+       cairo.la        \
        CIE.la          \
        gegl-fixups.la  \
        gggl-lies.la    \
@@ -22,6 +23,7 @@ ext_LTLIBRARIES = \
        naive-CMYK.la   \
        sse-fixups.la
 
+cairo_la_SOURCES = cairo.c
 CIE_la_SOURCES = CIE.c
 gegl_fixups_la_SOURCES = gegl-fixups.c
 gggl_lies_la_SOURCES = gggl-lies.c
index da448e26b4c526c028096626f583ddee48a511fc..ce45e71884a3e471b08a529249d8b25fb1126350 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -71,14 +71,23 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
 am__installdirs = "$(DESTDIR)$(extdir)"
 LTLIBRARIES = $(ext_LTLIBRARIES)
 CIE_la_LIBADD =
 am_CIE_la_OBJECTS = CIE.lo
 CIE_la_OBJECTS = $(am_CIE_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
+cairo_la_LIBADD =
+am_cairo_la_OBJECTS = cairo.lo
+cairo_la_OBJECTS = $(am_cairo_la_OBJECTS)
 gegl_fixups_la_LIBADD =
 am_gegl_fixups_la_OBJECTS = gegl-fixups.lo
 gegl_fixups_la_OBJECTS = $(am_gegl_fixups_la_OBJECTS)
@@ -110,30 +119,30 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
 am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(CIE_la_SOURCES) $(gegl_fixups_la_SOURCES) \
-       $(gggl_lies_la_SOURCES) $(gggl_la_SOURCES) \
-       $(gimp_8bit_la_SOURCES) $(naive_CMYK_la_SOURCES) \
-       $(sse_fixups_la_SOURCES)
-DIST_SOURCES = $(CIE_la_SOURCES) $(gegl_fixups_la_SOURCES) \
-       $(gggl_lies_la_SOURCES) $(gggl_la_SOURCES) \
-       $(gimp_8bit_la_SOURCES) $(naive_CMYK_la_SOURCES) \
-       $(sse_fixups_la_SOURCES)
+SOURCES = $(CIE_la_SOURCES) $(cairo_la_SOURCES) \
+       $(gegl_fixups_la_SOURCES) $(gggl_lies_la_SOURCES) \
+       $(gggl_la_SOURCES) $(gimp_8bit_la_SOURCES) \
+       $(naive_CMYK_la_SOURCES) $(sse_fixups_la_SOURCES)
+DIST_SOURCES = $(CIE_la_SOURCES) $(cairo_la_SOURCES) \
+       $(gegl_fixups_la_SOURCES) $(gggl_lies_la_SOURCES) \
+       $(gggl_la_SOURCES) $(gimp_8bit_la_SOURCES) \
+       $(naive_CMYK_la_SOURCES) $(sse_fixups_la_SOURCES)
 HEADERS = $(noinst_HEADERS)
 ETAGS = etags
 CTAGS = ctags
@@ -300,6 +309,7 @@ AM_CPPFLAGS = \
 
 extdir = $(libdir)/babl-@BABL_API_VERSION@
 ext_LTLIBRARIES = \
+       cairo.la        \
        CIE.la          \
        gegl-fixups.la  \
        gggl-lies.la    \
@@ -308,6 +318,7 @@ ext_LTLIBRARIES = \
        naive-CMYK.la   \
        sse-fixups.la
 
+cairo_la_SOURCES = cairo.c
 CIE_la_SOURCES = CIE.c
 gegl_fixups_la_SOURCES = gegl-fixups.c
 gggl_lies_la_SOURCES = gggl-lies.c
@@ -381,19 +392,21 @@ clean-extLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
-CIE.la: $(CIE_la_OBJECTS) $(CIE_la_DEPENDENCIES) 
+CIE.la: $(CIE_la_OBJECTS) $(CIE_la_DEPENDENCIES) $(EXTRA_CIE_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(CIE_la_OBJECTS) $(CIE_la_LIBADD) $(LIBS)
-gegl-fixups.la: $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_DEPENDENCIES) 
+cairo.la: $(cairo_la_OBJECTS) $(cairo_la_DEPENDENCIES) $(EXTRA_cairo_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(cairo_la_OBJECTS) $(cairo_la_LIBADD) $(LIBS)
+gegl-fixups.la: $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_DEPENDENCIES) $(EXTRA_gegl_fixups_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_LIBADD) $(LIBS)
-gggl-lies.la: $(gggl_lies_la_OBJECTS) $(gggl_lies_la_DEPENDENCIES) 
+gggl-lies.la: $(gggl_lies_la_OBJECTS) $(gggl_lies_la_DEPENDENCIES) $(EXTRA_gggl_lies_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gggl_lies_la_OBJECTS) $(gggl_lies_la_LIBADD) $(LIBS)
-gggl.la: $(gggl_la_OBJECTS) $(gggl_la_DEPENDENCIES) 
+gggl.la: $(gggl_la_OBJECTS) $(gggl_la_DEPENDENCIES) $(EXTRA_gggl_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gggl_la_OBJECTS) $(gggl_la_LIBADD) $(LIBS)
-gimp-8bit.la: $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_DEPENDENCIES) 
+gimp-8bit.la: $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_DEPENDENCIES) $(EXTRA_gimp_8bit_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_LIBADD) $(LIBS)
-naive-CMYK.la: $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_DEPENDENCIES) 
+naive-CMYK.la: $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_DEPENDENCIES) $(EXTRA_naive_CMYK_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_LIBADD) $(LIBS)
-sse-fixups.la: $(sse_fixups_la_OBJECTS) $(sse_fixups_la_DEPENDENCIES) 
+sse-fixups.la: $(sse_fixups_la_OBJECTS) $(sse_fixups_la_DEPENDENCIES) $(EXTRA_sse_fixups_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(sse_fixups_la_LINK) -rpath $(extdir) $(sse_fixups_la_OBJECTS) $(sse_fixups_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
@@ -403,6 +416,7 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIE.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gegl-fixups.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gggl-lies.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gggl.Plo@am__quote@
@@ -413,34 +427,30 @@ distclean-compile:
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 sse_fixups_la-sse-fixups.lo: sse-fixups.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -MT sse_fixups_la-sse-fixups.lo -MD -MP -MF $(DEPDIR)/sse_fixups_la-sse-fixups.Tpo -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/sse_fixups_la-sse-fixups.Tpo $(DEPDIR)/sse_fixups_la-sse-fixups.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sse-fixups.c' object='sse_fixups_la-sse-fixups.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sse-fixups.c' object='sse_fixups_la-sse-fixups.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -547,10 +557,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
diff --git a/extensions/cairo.c b/extensions/cairo.c
new file mode 100644 (file)
index 0000000..3a0732f
--- /dev/null
@@ -0,0 +1,86 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2012 Øyvind Kolås.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdlib.h>
+#include "babl.h"
+
+int init (void);
+
+int
+init (void)
+{
+  int   testint  = 23;
+  char *testchar = (char*) &testint;
+  int   littleendian = (testchar[0] == 23);
+
+  if (littleendian)
+    {
+      babl_format_new (
+        "name", "cairo-ARGB32",
+        babl_model ("R'aG'aB'aA"),
+        babl_type ("u8"),
+        babl_component ("B'a"),
+        babl_component ("G'a"),
+        babl_component ("R'a"),
+        babl_component ("A"),
+        NULL
+      );
+
+      babl_format_new (
+        "name", "cairo-RGB24",
+        babl_model ("R'G'B'"),
+        babl_type ("u8"),
+        babl_component ("B'"),
+        babl_component ("G'"),
+        babl_component ("R'"),
+        babl_component ("PAD"),
+        NULL
+      );
+    }
+  else
+    {
+      babl_format_new (
+        "name", "cairo-ARGB32",
+        babl_model ("R'G'B'A"),
+        babl_type ("u8"),
+        babl_component ("A"),
+        babl_component ("R'a"),
+        babl_component ("G'a"),
+        babl_component ("B'a"),
+        NULL
+      );
+      babl_format_new (
+        "name", "cairo-RGB24",
+        babl_model ("R'G'B'"),
+        babl_type ("u8"),
+        babl_component ("PAD"),
+        babl_component ("R'"),
+        babl_component ("G'"),
+        babl_component ("B'"),
+        NULL
+      );
+    }
+  babl_format_new (
+    "name", "cairo-A8",
+    babl_model ("YA"),
+    babl_type ("u8"),
+    babl_component ("A"),
+    NULL
+  );
+  return 0;
+}
index 4ee87a8659649c9fd870b4e691bc4e0bde8e2d33..3fb69773f50760d794e6fcb9837c4c3b4ca2d3c0 100644 (file)
@@ -527,7 +527,7 @@ int init (void);
 int
 init (void)
 {
-  Babl *rgbaF = babl_format_new (
+  const Babl *rgbaF = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("float"),
     babl_component ("R"),
@@ -535,7 +535,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgbAF = babl_format_new (
+  const Babl *rgbAF = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
     babl_component ("Ra"),
@@ -544,7 +544,7 @@ init (void)
     babl_component ("A"),
     NULL);
 
-  Babl *lrgba8 = babl_format_new (
+  const Babl *lrgba8 = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
     babl_component ("R"),
@@ -553,7 +553,7 @@ init (void)
     babl_component ("A"),
     NULL);
 
-  Babl *rgba8 = babl_format_new (
+  const Babl *rgba8 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
     babl_component ("R'"),
@@ -561,7 +561,7 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *bgrA8 = babl_format_new (
+  const Babl *bgrA8 = babl_format_new (
     "name", "B'aG'aR'aA u8",
     babl_model ("R'aG'aB'aA"),
     babl_type ("u8"),
@@ -570,14 +570,14 @@ init (void)
     babl_component ("R'a"),
     babl_component ("A"),
     NULL);
-  Babl *rgb8 = babl_format_new (
+  const Babl *rgb8 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
     NULL);
-  Babl *sdl32 = babl_format_new (
+  const Babl *sdl32 = babl_format_new (
     "name", "B'aG'aR'aPAD u8",
     babl_model ("R'G'B'"),
     babl_type ("u8"),
index 33d19efc7a9c36371ea6a28c1b04005c1fd4261e..6627e6e3eadc1805d9a931f3ff752d7270ee55b0 100644 (file)
@@ -1796,7 +1796,7 @@ int init (void);
 int
 init (void)
 {
-  Babl *rgbaF = babl_format_new (
+  const Babl *rgbaF = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("float"),
     babl_component ("R"),
@@ -1804,7 +1804,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgba16 = babl_format_new (
+  const Babl *rgba16 = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u16"),
     babl_component ("R"),
@@ -1812,7 +1812,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgbaD = babl_format_new (
+  const Babl *rgbaD = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("double"),
     babl_component ("R"),
@@ -1820,7 +1820,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgba8 = babl_format_new (
+  const Babl *rgba8 = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
     babl_component ("R"),
@@ -1828,7 +1828,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgbAF = babl_format_new (
+  const Babl *rgbAF = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
     babl_component ("Ra"),
@@ -1836,7 +1836,7 @@ init (void)
     babl_component ("Ba"),
     babl_component ("A"),
     NULL);
-  Babl *rgbA16 = babl_format_new (
+  const Babl *rgbA16 = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("u16"),
     babl_component ("Ra"),
@@ -1844,7 +1844,7 @@ init (void)
     babl_component ("Ba"),
     babl_component ("A"),
     NULL);
-  Babl *rgbA8 = babl_format_new (
+  const Babl *rgbA8 = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("u8"),
     babl_component ("Ra"),
@@ -1852,79 +1852,79 @@ init (void)
     babl_component ("Ba"),
     babl_component ("A"),
     NULL);
-  Babl *rgbF = babl_format_new (
+  const Babl *rgbF = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
     NULL);
-  Babl *rgb16 = babl_format_new (
+  const Babl *rgb16 = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u16"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
     NULL);
-  Babl *rgb8 = babl_format_new (
+  const Babl *rgb8 = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
     NULL);
-  Babl *gaF = babl_format_new (
+  const Babl *gaF = babl_format_new (
     babl_model ("YA"),
     babl_type ("float"),
     babl_component ("Y"),
     babl_component ("A"),
     NULL);
-  Babl *gAF = babl_format_new (
+  const Babl *gAF = babl_format_new (
     babl_model ("YaA"),
     babl_type ("float"),
     babl_component ("Ya"),
     babl_component ("A"),
     NULL);
-  Babl *gF = babl_format_new (
+  const Babl *gF = babl_format_new (
     babl_model ("Y"),
     babl_type ("float"),
     babl_component ("Y"),
     NULL);
-  Babl *ga16 = babl_format_new (
+  const Babl *ga16 = babl_format_new (
     babl_model ("YA"),
     babl_type ("u16"),
     babl_component ("Y"),
     babl_component ("A"),
     NULL);
-  Babl *gA16 = babl_format_new (
+  const Babl *gA16 = babl_format_new (
     babl_model ("YaA"),
     babl_type ("u16"),
     babl_component ("Ya"),
     babl_component ("A"),
     NULL);
-  Babl *g16 = babl_format_new (
+  const Babl *g16 = babl_format_new (
     babl_model ("Y"),
     babl_type ("u16"),
     babl_component ("Y"),
     NULL);
-  Babl *ga8 = babl_format_new (
+  const Babl *ga8 = babl_format_new (
     babl_model ("YA"),
     babl_type ("u8"),
     babl_component ("Y"),
     babl_component ("A"),
     NULL);
-  Babl *gA8 = babl_format_new (
+  const Babl *gA8 = babl_format_new (
     babl_model ("YaA"),
     babl_type ("u8"),
     babl_component ("Ya"),
     babl_component ("A"),
     NULL);
-  Babl *g8 = babl_format_new (
+  const Babl *g8 = babl_format_new (
     babl_model ("Y"),
     babl_type ("u8"),
     babl_component ("Y"),
     NULL);
-  Babl *yuv8 = babl_format_new (
+  const Babl *yuv8 = babl_format_new (
     "name", "Y'CbCr u8",
     "planar",
     babl_model ("Y'CbCr"),
@@ -1936,7 +1936,7 @@ init (void)
     babl_component ("Cb"),
     babl_component ("Cr"),
     NULL);
-  Babl *yuvF = babl_format_new (
+  const Babl *yuvF = babl_format_new (
     babl_model ("Y'CbCr"),
     babl_type ("float"),
     babl_component ("Y'"),
@@ -1944,7 +1944,7 @@ init (void)
     babl_component ("Cb"),
     babl_component ("Cr"),
     NULL);
-  Babl *yuvaF = babl_format_new (
+  const Babl *yuvaF = babl_format_new (
     babl_model ("Y'CbCrA"),
     babl_type ("float"),
     babl_component ("Y'"),
index d9d9ca1aaccacf609be27c81a851d6fabecf9db6..16d3276fc82198485eb38e131dad39a5a4171018 100644 (file)
@@ -1630,7 +1630,7 @@ int init (void);
 int
 init (void)
 {
-  Babl *rgbaD = babl_format_new (
+  const Babl *rgbaD = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("double"),
     babl_component ("R'"),
@@ -1638,7 +1638,7 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *rgbaF = babl_format_new (
+  const Babl *rgbaF = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("float"),
     babl_component ("R'"),
@@ -1646,7 +1646,7 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *rgba16 = babl_format_new (
+  const Babl *rgba16 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u16"),
     babl_component ("R'"),
@@ -1654,7 +1654,7 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *rgba8 = babl_format_new (
+  const Babl *rgba8 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
     babl_component ("R'"),
@@ -1662,7 +1662,7 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *rgbAF = babl_format_new (
+  const Babl *rgbAF = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("float"),
     babl_component ("R'a"),
@@ -1670,7 +1670,7 @@ init (void)
     babl_component ("B'a"),
     babl_component ("A"),
     NULL);
-  Babl *rgbA16 = babl_format_new (
+  const Babl *rgbA16 = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("u16"),
     babl_component ("R'a"),
@@ -1678,7 +1678,7 @@ init (void)
     babl_component ("B'a"),
     babl_component ("A"),
     NULL);
-  Babl *rgbA8 = babl_format_new (
+  const Babl *rgbA8 = babl_format_new (
     babl_model ("R'aG'aB'aA"),
     babl_type ("u8"),
     babl_component ("R'a"),
@@ -1686,79 +1686,79 @@ init (void)
     babl_component ("B'a"),
     babl_component ("A"),
     NULL);
-  Babl *rgbF = babl_format_new (
+  const Babl *rgbF = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("float"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
     NULL);
-  Babl *rgb16 = babl_format_new (
+  const Babl *rgb16 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u16"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
     NULL);
-  Babl *rgb8 = babl_format_new (
+  const Babl *rgb8 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
     NULL);
-  Babl *gaF = babl_format_new (
+  const Babl *gaF = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("float"),
     babl_component ("Y'"),
     babl_component ("A"),
     NULL);
-  Babl *gAF = babl_format_new (
+  const Babl *gAF = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("float"),
     babl_component ("Y'a"),
     babl_component ("A"),
     NULL);
-  Babl *gF = babl_format_new (
+  const Babl *gF = babl_format_new (
     babl_model ("Y'"),
     babl_type ("float"),
     babl_component ("Y'"),
     NULL);
-  Babl *ga16 = babl_format_new (
+  const Babl *ga16 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u16"),
     babl_component ("Y'"),
     babl_component ("A"),
     NULL);
-  Babl *gA16 = babl_format_new (
+  const Babl *gA16 = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("u16"),
     babl_component ("Y'a"),
     babl_component ("A"),
     NULL);
-  Babl *g16 = babl_format_new (
+  const Babl *g16 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u16"),
     babl_component ("Y'"),
     NULL);
-  Babl *ga8 = babl_format_new (
+  const Babl *ga8 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u8"),
     babl_component ("Y'"),
     babl_component ("A"),
     NULL);
-  Babl *gA8 = babl_format_new (
+  const Babl *gA8 = babl_format_new (
     babl_model ("Y'aA"),
     babl_type ("u8"),
     babl_component ("Y'a"),
     babl_component ("A"),
     NULL);
-  Babl *g8 = babl_format_new (
+  const Babl *g8 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u8"),
     babl_component ("Y'"),
     NULL);
-  Babl *yuvF = babl_format_new (
+  const Babl *yuvF = babl_format_new (
     babl_model ("Y'CbCr"),
     babl_type ("float"),
     babl_component ("Y'"),
@@ -1766,7 +1766,7 @@ init (void)
     babl_component ("Cb"),
     babl_component ("Cr"),
     NULL);
-  Babl *yuvaF = babl_format_new (
+  const Babl *yuvaF = babl_format_new (
     babl_model ("Y'CbCrA"),
     babl_type ("float"),
     babl_component ("Y'"),
index dd5e7cbf32aed21f8ba33c0a4b1fdc436687e6fb..d3e952250a8b43cdda5ee3c52896cc73cb7295d5 100644 (file)
@@ -389,7 +389,7 @@ int init (void);
 int
 init (void)
 {
-  Babl *ragabaaF_linear = babl_format_new (
+  const Babl *ragabaaF_linear = babl_format_new (
     babl_model ("RaGaBaA"),
     babl_type ("float"),
     babl_component ("Ra"),
@@ -397,7 +397,7 @@ init (void)
     babl_component ("Ba"),
     babl_component ("A"),
     NULL);
-  Babl *rgbaF_linear = babl_format_new (
+  const Babl *rgbaF_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("float"),
     babl_component ("R"),
@@ -405,7 +405,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgba8_linear = babl_format_new (
+  const Babl *rgba8_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
     babl_component ("R"),
@@ -413,7 +413,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgba8_gamma_2_2 = babl_format_new (
+  const Babl *rgba8_gamma_2_2 = babl_format_new (
     babl_model ("R'G'B'A"),
     babl_type ("u8"),
     babl_component ("R'"),
@@ -421,56 +421,56 @@ init (void)
     babl_component ("B'"),
     babl_component ("A"),
     NULL);
-  Babl *rgbF_linear = babl_format_new (
+  const Babl *rgbF_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("float"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
     NULL);
-  Babl *rgb8_linear = babl_format_new (
+  const Babl *rgb8_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
     babl_component ("G"),
     babl_component ("B"),
     NULL);
-  Babl *rgb8_gamma_2_2 = babl_format_new (
+  const Babl *rgb8_gamma_2_2 = babl_format_new (
     babl_model ("R'G'B'"),
     babl_type ("u8"),
     babl_component ("R'"),
     babl_component ("G'"),
     babl_component ("B'"),
     NULL);
-  Babl *gaF_linear = babl_format_new (
+  const Babl *gaF_linear = babl_format_new (
     babl_model ("YA"),
     babl_type ("float"),
     babl_component ("Y"),
     babl_component ("A"),
     NULL);
-  Babl *ga8_linear = babl_format_new (
+  const Babl *ga8_linear = babl_format_new (
     babl_model ("YA"),
     babl_type ("u8"),
     babl_component ("Y"),
     babl_component ("A"),
     NULL);
-  Babl *ga8_gamma_2_2 = babl_format_new (
+  const Babl *ga8_gamma_2_2 = babl_format_new (
     babl_model ("Y'A"),
     babl_type ("u8"),
     babl_component ("Y'"),
     babl_component ("A"),
     NULL);
-  Babl *gF_linear = babl_format_new (
+  const Babl *gF_linear = babl_format_new (
     babl_model ("Y"),
     babl_type ("float"),
     babl_component ("Y"),
     NULL);
-  Babl *g8_linear = babl_format_new (
+  const Babl *g8_linear = babl_format_new (
     babl_model ("Y"),
     babl_type ("u8"),
     babl_component ("Y"),
     NULL);
-  Babl *g8_gamma_2_2 = babl_format_new (
+  const Babl *g8_gamma_2_2 = babl_format_new (
     babl_model ("Y'"),
     babl_type ("u8"),
     babl_component ("Y'"),
index 96c2585e1c57d6cd4430e54ff2c88b1c205072a7..83fa240575a6cf23489482c19cae82abc75031ae 100644 (file)
@@ -175,7 +175,7 @@ init (void)
 {
 #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX)
 
-  Babl *rgbaF_linear = babl_format_new (
+  const Babl *rgbaF_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("float"),
     babl_component ("R"),
@@ -183,7 +183,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgba8_linear = babl_format_new (
+  const Babl *rgba8_linear = babl_format_new (
     babl_model ("RGBA"),
     babl_type ("u8"),
     babl_component ("R"),
@@ -191,7 +191,7 @@ init (void)
     babl_component ("B"),
     babl_component ("A"),
     NULL);
-  Babl *rgb8_linear = babl_format_new (
+  const Babl *rgb8_linear = babl_format_new (
     babl_model ("RGB"),
     babl_type ("u8"),
     babl_component ("R"),
index 6781b987bdbcbc23efe6bbe1654a1e3637b9af07..a9244eb0786534553fdd9eb0050bb4b172bad0a3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-01-19.21; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@ while test $# -ne 0; do
     -s) stripcmd=$stripprog;;
 
     -t) dst_arg=$2
+       # Protect names problematic for `test' and other utilities.
+       case $dst_arg in
+         -* | [=\(\)!]) dst_arg=./$dst_arg;;
+       esac
        shift;;
 
     -T) no_target_directory=true;;
@@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
     fi
     shift # arg
     dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
   done
 fi
 
@@ -200,7 +208,11 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
-  trap '(exit $?); exit' 1 2 13 15
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
 
   # Set umask so as not to create temps with too-generous modes.
   # However, 'strip' requires both read and write access to temps.
@@ -228,9 +240,9 @@ fi
 
 for src
 do
-  # Protect names starting with `-'.
+  # Protect names problematic for `test' and other utilities.
   case $src in
-    -*) src=./$src;;
+    -* | [=\(\)!]) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@ do
       echo "$0: no destination specified." >&2
       exit 1
     fi
-
     dst=$dst_arg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
@@ -385,7 +392,7 @@ do
 
       case $dstdir in
        /*) prefix='/';;
-       -*) prefix='./';;
+       [-=\(\)!]*) prefix='./';;
        *)  prefix='';;
       esac
 
@@ -403,7 +410,7 @@ do
 
       for d
       do
-       test -z "$d" && continue
+       test X"$d" = X && continue
 
        prefix=$prefix$d
        if test -d "$prefix"; then
index 589721c5a02008e3b32e3978e6b201d6f4c6cb92..84e2c612d0728661f94aa31eb06ab5af012e9d05 100644 (file)
@@ -22,7 +22,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
         AC_ARG_ENABLE(introspection,
                   AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
                                  [Enable introspection for this build]),, 
-                                 [enable_introspection=auto])
+                                 [enable_introspection=no])
     ])dnl
 
     AC_MSG_CHECKING([for gobject-introspection])
diff --git a/missing b/missing
index 28055d2ae6f2a2c584afcd769d7881e11f62ecd9..86a8fc31e3c2aa268688a5be47d161c586772e78 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
 
 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@ Supported PROGRAM values:
   help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
@@ -122,15 +121,6 @@ case $1 in
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
   *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
@@ -226,7 +216,7 @@ WARNING: \`$1' $msg.  You should only need it if
          \`Bison' from any GNU archive site."
     rm -f y.tab.c y.tab.h
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.y)
            SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@ WARNING: \`$1' is $msg.  You should only need it if
          \`Flex' from any GNU archive site."
     rm -f lex.yy.c
     if test $# -ne 1; then
-        eval LASTARG="\${$#}"
+        eval LASTARG=\${$#}
        case $LASTARG in
        *.l)
            SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-       case $firstarg in
-       *o*)
-           firstarg=`echo "$firstarg" | sed s/o//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-       case $firstarg in
-       *h*)
-           firstarg=`echo "$firstarg" | sed s/h//`
-           tar "$firstarg" "$@" && exit 0
-           ;;
-       esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
   *)
     echo 1>&2 "\
 WARNING: \`$1' is needed, and is $msg.
index e8fdd1d726c9d65df3941e917c69fac92f512691..ba88a9c58c7ecde3784b83a8224ed687ec0f9782 100644 (file)
@@ -10,6 +10,9 @@ TESTS =                               \
        sanity                  \
        babl_class_name         \
        types                   \
+       palette \
+       extract \
+       nop \
        n_components            \
        models                  \
        $(CONCURRENCY_STRESS_TEST)
@@ -31,5 +34,4 @@ noinst_PROGRAMS =             \
        babl-html-dump          \
        conversions             \
        formats                 \
-       nop                     \
        $(TESTS)
index d8ca58e1b736253549a99b2d35bc9b10cfb4712b..25ec512811a6aa0e4c9410042c9b37408ed13ec5 100644 (file)
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -36,12 +36,12 @@ build_triplet = @build@
 host_triplet = @host@
 TESTS = grayscale_to_rgb$(EXEEXT) rgb_to_bgr$(EXEEXT) \
        rgb_to_ycbcr$(EXEEXT) srgb_to_lab_u8$(EXEEXT) sanity$(EXEEXT) \
-       babl_class_name$(EXEEXT) types$(EXEEXT) n_components$(EXEEXT) \
+       babl_class_name$(EXEEXT) types$(EXEEXT) palette$(EXEEXT) \
+       extract$(EXEEXT) nop$(EXEEXT) n_components$(EXEEXT) \
        models$(EXEEXT) $(am__EXEEXT_1)
 noinst_PROGRAMS = introspect$(EXEEXT) babl_fish_path_fitness$(EXEEXT) \
        babl_fish_path_dhtml$(EXEEXT) babl-html-dump$(EXEEXT) \
-       conversions$(EXEEXT) formats$(EXEEXT) nop$(EXEEXT) \
-       $(am__EXEEXT_2)
+       conversions$(EXEEXT) formats$(EXEEXT) $(am__EXEEXT_2)
 subdir = tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -59,7 +59,8 @@ CONFIG_CLEAN_VPATH_FILES =
 @OS_UNIX_TRUE@am__EXEEXT_1 = concurrency-stress-test$(EXEEXT)
 am__EXEEXT_2 = grayscale_to_rgb$(EXEEXT) rgb_to_bgr$(EXEEXT) \
        rgb_to_ycbcr$(EXEEXT) srgb_to_lab_u8$(EXEEXT) sanity$(EXEEXT) \
-       babl_class_name$(EXEEXT) types$(EXEEXT) n_components$(EXEEXT) \
+       babl_class_name$(EXEEXT) types$(EXEEXT) palette$(EXEEXT) \
+       extract$(EXEEXT) nop$(EXEEXT) n_components$(EXEEXT) \
        models$(EXEEXT) $(am__EXEEXT_1)
 PROGRAMS = $(noinst_PROGRAMS)
 babl_html_dump_SOURCES = babl-html-dump.c
@@ -69,8 +70,8 @@ am__DEPENDENCIES_1 =
 babl_html_dump_DEPENDENCIES =  \
        $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
        $(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 babl_class_name_SOURCES = babl_class_name.c
 babl_class_name_OBJECTS = babl_class_name.$(OBJEXT)
@@ -102,6 +103,12 @@ conversions_LDADD = $(LDADD)
 conversions_DEPENDENCIES =  \
        $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
        $(am__DEPENDENCIES_1)
+extract_SOURCES = extract.c
+extract_OBJECTS = extract.$(OBJEXT)
+extract_LDADD = $(LDADD)
+extract_DEPENDENCIES =  \
+       $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
+       $(am__DEPENDENCIES_1)
 formats_SOURCES = formats.c
 formats_OBJECTS = formats.$(OBJEXT)
 formats_LDADD = $(LDADD)
@@ -137,6 +144,12 @@ nop_OBJECTS = nop.$(OBJEXT)
 nop_LDADD = $(LDADD)
 nop_DEPENDENCIES = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
        $(am__DEPENDENCIES_1)
+palette_SOURCES = palette.c
+palette_OBJECTS = palette.$(OBJEXT)
+palette_LDADD = $(LDADD)
+palette_DEPENDENCIES =  \
+       $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
+       $(am__DEPENDENCIES_1)
 rgb_to_bgr_SOURCES = rgb_to_bgr.c
 rgb_to_bgr_OBJECTS = rgb_to_bgr.$(OBJEXT)
 rgb_to_bgr_LDADD = $(LDADD)
@@ -177,32 +190,33 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
        $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
 am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
 am__v_at_0 = @
 CCLD = $(CC)
 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
        $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD  " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = babl-html-dump.c babl_class_name.c babl_fish_path_dhtml.c \
        babl_fish_path_fitness.c concurrency-stress-test.c \
-       conversions.c formats.c grayscale_to_rgb.c introspect.c \
-       models.c n_components.c nop.c rgb_to_bgr.c rgb_to_ycbcr.c \
-       sanity.c srgb_to_lab_u8.c types.c
+       conversions.c extract.c formats.c grayscale_to_rgb.c \
+       introspect.c models.c n_components.c nop.c palette.c \
+       rgb_to_bgr.c rgb_to_ycbcr.c sanity.c srgb_to_lab_u8.c types.c
 DIST_SOURCES = babl-html-dump.c babl_class_name.c \
        babl_fish_path_dhtml.c babl_fish_path_fitness.c \
-       concurrency-stress-test.c conversions.c formats.c \
+       concurrency-stress-test.c conversions.c extract.c formats.c \
        grayscale_to_rgb.c introspect.c models.c n_components.c nop.c \
-       rgb_to_bgr.c rgb_to_ycbcr.c sanity.c srgb_to_lab_u8.c types.c
+       palette.c rgb_to_bgr.c rgb_to_ycbcr.c sanity.c \
+       srgb_to_lab_u8.c types.c
 ETAGS = etags
 CTAGS = ctags
 am__tty_colors = \
@@ -409,55 +423,61 @@ clean-noinstPROGRAMS:
        list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
        echo " rm -f" $$list; \
        rm -f $$list
-babl-html-dump$(EXEEXT): $(babl_html_dump_OBJECTS) $(babl_html_dump_DEPENDENCIES) 
+babl-html-dump$(EXEEXT): $(babl_html_dump_OBJECTS) $(babl_html_dump_DEPENDENCIES) $(EXTRA_babl_html_dump_DEPENDENCIES) 
        @rm -f babl-html-dump$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(babl_html_dump_OBJECTS) $(babl_html_dump_LDADD) $(LIBS)
-babl_class_name$(EXEEXT): $(babl_class_name_OBJECTS) $(babl_class_name_DEPENDENCIES) 
+babl_class_name$(EXEEXT): $(babl_class_name_OBJECTS) $(babl_class_name_DEPENDENCIES) $(EXTRA_babl_class_name_DEPENDENCIES) 
        @rm -f babl_class_name$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(babl_class_name_OBJECTS) $(babl_class_name_LDADD) $(LIBS)
-babl_fish_path_dhtml$(EXEEXT): $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_DEPENDENCIES) 
+babl_fish_path_dhtml$(EXEEXT): $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_DEPENDENCIES) $(EXTRA_babl_fish_path_dhtml_DEPENDENCIES) 
        @rm -f babl_fish_path_dhtml$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_LDADD) $(LIBS)
-babl_fish_path_fitness$(EXEEXT): $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_DEPENDENCIES) 
+babl_fish_path_fitness$(EXEEXT): $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_DEPENDENCIES) $(EXTRA_babl_fish_path_fitness_DEPENDENCIES) 
        @rm -f babl_fish_path_fitness$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_LDADD) $(LIBS)
-concurrency-stress-test$(EXEEXT): $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_DEPENDENCIES) 
+concurrency-stress-test$(EXEEXT): $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_DEPENDENCIES) $(EXTRA_concurrency_stress_test_DEPENDENCIES) 
        @rm -f concurrency-stress-test$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_LDADD) $(LIBS)
-conversions$(EXEEXT): $(conversions_OBJECTS) $(conversions_DEPENDENCIES) 
+conversions$(EXEEXT): $(conversions_OBJECTS) $(conversions_DEPENDENCIES) $(EXTRA_conversions_DEPENDENCIES) 
        @rm -f conversions$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(conversions_OBJECTS) $(conversions_LDADD) $(LIBS)
-formats$(EXEEXT): $(formats_OBJECTS) $(formats_DEPENDENCIES) 
+extract$(EXEEXT): $(extract_OBJECTS) $(extract_DEPENDENCIES) $(EXTRA_extract_DEPENDENCIES) 
+       @rm -f extract$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(extract_OBJECTS) $(extract_LDADD) $(LIBS)
+formats$(EXEEXT): $(formats_OBJECTS) $(formats_DEPENDENCIES) $(EXTRA_formats_DEPENDENCIES) 
        @rm -f formats$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(formats_OBJECTS) $(formats_LDADD) $(LIBS)
-grayscale_to_rgb$(EXEEXT): $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_DEPENDENCIES) 
+grayscale_to_rgb$(EXEEXT): $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_DEPENDENCIES) $(EXTRA_grayscale_to_rgb_DEPENDENCIES) 
        @rm -f grayscale_to_rgb$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_LDADD) $(LIBS)
-introspect$(EXEEXT): $(introspect_OBJECTS) $(introspect_DEPENDENCIES) 
+introspect$(EXEEXT): $(introspect_OBJECTS) $(introspect_DEPENDENCIES) $(EXTRA_introspect_DEPENDENCIES) 
        @rm -f introspect$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(introspect_OBJECTS) $(introspect_LDADD) $(LIBS)
-models$(EXEEXT): $(models_OBJECTS) $(models_DEPENDENCIES) 
+models$(EXEEXT): $(models_OBJECTS) $(models_DEPENDENCIES) $(EXTRA_models_DEPENDENCIES) 
        @rm -f models$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(models_OBJECTS) $(models_LDADD) $(LIBS)
-n_components$(EXEEXT): $(n_components_OBJECTS) $(n_components_DEPENDENCIES) 
+n_components$(EXEEXT): $(n_components_OBJECTS) $(n_components_DEPENDENCIES) $(EXTRA_n_components_DEPENDENCIES) 
        @rm -f n_components$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(n_components_OBJECTS) $(n_components_LDADD) $(LIBS)
-nop$(EXEEXT): $(nop_OBJECTS) $(nop_DEPENDENCIES) 
+nop$(EXEEXT): $(nop_OBJECTS) $(nop_DEPENDENCIES) $(EXTRA_nop_DEPENDENCIES) 
        @rm -f nop$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(nop_OBJECTS) $(nop_LDADD) $(LIBS)
-rgb_to_bgr$(EXEEXT): $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_DEPENDENCIES) 
+palette$(EXEEXT): $(palette_OBJECTS) $(palette_DEPENDENCIES) $(EXTRA_palette_DEPENDENCIES) 
+       @rm -f palette$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(palette_OBJECTS) $(palette_LDADD) $(LIBS)
+rgb_to_bgr$(EXEEXT): $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_DEPENDENCIES) $(EXTRA_rgb_to_bgr_DEPENDENCIES) 
        @rm -f rgb_to_bgr$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_LDADD) $(LIBS)
-rgb_to_ycbcr$(EXEEXT): $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_DEPENDENCIES) 
+rgb_to_ycbcr$(EXEEXT): $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_DEPENDENCIES) $(EXTRA_rgb_to_ycbcr_DEPENDENCIES) 
        @rm -f rgb_to_ycbcr$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_LDADD) $(LIBS)
-sanity$(EXEEXT): $(sanity_OBJECTS) $(sanity_DEPENDENCIES) 
+sanity$(EXEEXT): $(sanity_OBJECTS) $(sanity_DEPENDENCIES) $(EXTRA_sanity_DEPENDENCIES) 
        @rm -f sanity$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(sanity_OBJECTS) $(sanity_LDADD) $(LIBS)
-srgb_to_lab_u8$(EXEEXT): $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_DEPENDENCIES) 
+srgb_to_lab_u8$(EXEEXT): $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_DEPENDENCIES) $(EXTRA_srgb_to_lab_u8_DEPENDENCIES) 
        @rm -f srgb_to_lab_u8$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_LDADD) $(LIBS)
-types$(EXEEXT): $(types_OBJECTS) $(types_DEPENDENCIES) 
+types$(EXEEXT): $(types_OBJECTS) $(types_DEPENDENCIES) $(EXTRA_types_DEPENDENCIES) 
        @rm -f types$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(types_OBJECTS) $(types_LDADD) $(LIBS)
 
@@ -473,12 +493,14 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl_fish_path_fitness.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/concurrency-stress-test.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formats.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grayscale_to_rgb.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspect.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/models.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/n_components.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nop.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/palette.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb_to_bgr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb_to_ycbcr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanity.Po@am__quote@
@@ -488,26 +510,23 @@ distclean-compile:
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
 
 .c.lo:
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -648,14 +667,15 @@ check-TESTS: $(TESTS)
          fi; \
          dashes=`echo "$$dashes" | sed s/./=/g`; \
          if test "$$failed" -eq 0; then \
-           echo "$$grn$$dashes"; \
+           col="$$grn"; \
          else \
-           echo "$$red$$dashes"; \
+           col="$$red"; \
          fi; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes$$std"; \
+         echo "$${col}$$dashes$${std}"; \
+         echo "$${col}$$banner$${std}"; \
+         test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+         test -z "$$report" || echo "$${col}$$report$${std}"; \
+         echo "$${col}$$dashes$${std}"; \
          test "$$failed" -eq 0; \
        else :; fi
 
@@ -704,10 +724,15 @@ install-am: all-am
 
 installcheck: installcheck-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+       if test -z '$(STRIP)'; then \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+             install; \
+       else \
+         $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+           install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+           "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+       fi
 mostlyclean-generic:
 
 clean-generic:
index 20d31b41c36d9ab72f69290d732fe1ff68befeb1..7832c23a4dfa4204b23b1ae3066ce3afb8f5ff4c 100644 (file)
@@ -39,7 +39,7 @@ babl_fish_path_stress_test_thread_func (void *not_used)
       /* Try to get a fish with an as complex conversion path as
        * possible
        */
-      Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
+      const Babl *fish = babl_fish ("R'G'B'A u16", "YA double");
 
       /* Just do something random with the fish */
       babl_get_name (fish);
diff --git a/tests/extract.c b/tests/extract.c
new file mode 100644 (file)
index 0000000..6f6e927
--- /dev/null
@@ -0,0 +1,144 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2005, Øyvind Kolås.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "babl.h"
+
+
+#define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
+  {       \
+  const Babl *fish;       \
+  int i;       \
+  fish = babl_fish (src_fmt, dst_fmt);       \
+  if (!fish)       \
+    {       \
+      printf ("  %s failed to make fish\n", test_name);       \
+      OK = 0;       \
+    }       \
+  for (i = 0; i < sizeof(src_pix)/sizeof(src_pix[0]); i ++)       \
+    {       \
+      int c;\
+      componenttype result[10];       \
+      babl_process (fish, src_pix[i], result, 1);       \
+      for (c = 0; c < sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \
+      if (result[c] != expected_pix[i][c])       \
+        {       \
+          printf (" %s failed #%i[%i]   %i\n", test_name, i, c, result[c]);       \
+          OK = 0;          \
+        }       \
+    }       \
+  }
+
+int
+main (int    argc,
+      char **argv)
+{
+  int OK = 1;
+  babl_init ();
+
+  {
+    char in[][4]  = {{0,1,2,3},{4,5,6,7},{8,9,10,11}};
+    char out[][1] = {{      3},{      7},{       11}};
+
+    babl_format_new ("name", "A u8",
+         babl_model ("YA"), babl_type ("u8"),
+          babl_component ("A"), NULL);
+
+    CHECK_CONV("extract alpha", char,
+        babl_format("RGBA u8"), babl_format("A u8"),
+        in, out);
+  }
+
+  {
+    char in[][4]  = {{0,1,2,3},{4,5,6,7},{8,9,10,11}};
+    char out[][1] = {{  1    },{  5    },{  9      }};
+
+    babl_format_new ("name", "G u8",
+         babl_model ("RGBA"), babl_type ("u8"),
+          babl_component ("G"), NULL);
+
+    CHECK_CONV("extract green", char,
+         babl_format("RGBA u8"), babl_format("G u8"),
+         in, out);
+  }
+
+
+  {
+    char in[][4]  = {{0,1,2,3},{4,5,6,7},{8,9,10,11}};
+    char out[][2] = {{  2,1  },{  6,5  },{  10,9   }};
+
+    babl_format_new ("name", "BG u8",
+         babl_model ("RGBA"), babl_type ("u8"),
+          babl_component ("B"),
+          babl_component ("G"), NULL);
+
+    CHECK_CONV("extract green", char,
+         babl_format("RGBA u8"), babl_format("BG u8"),
+         in, out);
+  }
+
+
+
+  {
+    float in[][4]  = {{0,1,2,3/255.0},{4,5,6,277/255.0},{8,9,10,101/255.0}};
+    char out[][1] = {{       3},      {      255},{             101}};
+
+    CHECK_CONV("extract alpha from float", char,
+         babl_format("RGBA float"), babl_format("A u8"),
+         in, out);
+  }
+
+  {
+    char in[][4]   = {{1,2,3,4},{4,5,6,7},{8,9,10,11}};
+    char out[][4]  = {{4,3,2,1},{7,6,5,4},{11,10,9,8}};
+
+    babl_format_new ("name", "abgr",
+         babl_model ("RGBA"), babl_type ("u8"),
+          babl_component ("A"),
+          babl_component ("B"),
+          babl_component ("G"),
+          babl_component ("R"),
+          NULL);
+
+    CHECK_CONV("bgra", char,
+         babl_format("RGBA u8"), babl_format("abgr"),
+         in, out);
+  }
+
+  {
+    char in[][4]   = {{1,2,3,4},{4,5,6,7},{8,9,10,11}};
+    //char out[][4]= {{3,0,0,4},{6,0,0,7},{10,0,0,11}};
+    char out[][4]  = {{3,3,3,4},{6,6,6,7},{10,10,10,11}};
+
+    CHECK_CONV("bPADa", char,
+         babl_format("RGBA u8"),
+         babl_format_new (babl_model ("RGBA"), babl_type ("u8"),
+               babl_component ("B"),
+               babl_component ("PAD"),
+               babl_component ("PAD"),
+               babl_component ("A"),
+               NULL),
+         in, out);
+  }
+
+  babl_exit ();
+  return !OK;
+}
index 8e004b9307cbaf98bb2c6ea880d6c80b491ed93c..6658f7fcce4aae347144f2fa00aa3526b7f7786b 100644 (file)
@@ -31,7 +31,7 @@ float rgb_buf     [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
index 0cfeb1163c9e01721f0ad85ed6500b97029b2b0e..0d62e7d5fb1e31e48184b2a477ac4ac3730ecd7f 100644 (file)
@@ -77,9 +77,9 @@ test (void)
 
   for (components = 1; components < 2048; components ++)
   {
-    Babl *fish;
-    Babl *src_fmt;
-    Babl *dst_fmt;
+    const Babl *fish;
+    const Babl *src_fmt;
+    const Babl *dst_fmt;
     int   i;
 
     src_fmt = babl_format_n (babl_type ("float"), components);
diff --git a/tests/palette.c b/tests/palette.c
new file mode 100644 (file)
index 0000000..6ad517f
--- /dev/null
@@ -0,0 +1,177 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2005, Øyvind Kolås.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "babl.h"
+
+
+#define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \
+  {       \
+  const Babl *fish;       \
+  int i;       \
+  fish = babl_fish (src_fmt, dst_fmt);       \
+  if (!fish)       \
+    {       \
+      printf ("  %s failed to make fish\n", test_name);       \
+      OK = 0;       \
+    }       \
+  for (i = 0; i < sizeof(src_pix)/sizeof(src_pix[0]); i ++)       \
+    {       \
+      int c;\
+      componenttype result[10];       \
+      babl_process (fish, src_pix[i], result, 1);       \
+      for (c = 0; c < sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \
+      if (result[c] != expected_pix[i][c])       \
+        {       \
+          printf (" %s failed #%i[%i]  got %i expected %i\n", test_name, i, c, result[c], expected_pix[i][c]);       \
+          OK = 0;          \
+        }       \
+    }       \
+  }
+
+#include <assert.h>
+
+int
+main (int    argc,
+      char **argv)
+{
+  int OK = 1;
+  babl_init ();
+  if(1){
+    unsigned char in[][1]   = {{        0},{          1},{          2},{15}};
+    unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
+    const Babl *palA;// = babl_new_palette (NULL, 0);
+    //Babl *palB = babl_new_palette (NULL, 0);
+    //
+    babl_new_palette (NULL, &palA, NULL);
+    assert (palA);
+
+    CHECK_CONV("pal to rgba", unsigned char,
+        palA, babl_format("RGBA u8"),
+        in, out);
+  }
+  if(0){
+    unsigned char in[][2]   = {{    0,255},{      1,255},{      2,255},{15,200}};
+    unsigned char out[][4]  = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}};
+    const Babl *palA;// = babl_new_palette (NULL, 0);
+    //Babl *palB = babl_new_palette (NULL, 0);
+    //
+    babl_new_palette (NULL, NULL, &palA);
+    assert (palA);
+
+    CHECK_CONV("pal to rgba", unsigned char,
+        palA, babl_format("RGBA u8"),
+        in, out);
+
+#if 0
+    CHECK_CONV("pal to rgba", unsigned char,
+        palB, babl_format("RGBA u8"),
+        in, out);
+
+    CHECK_CONV("pal to rgba", unsigned char,
+        palA, babl_format("RGBA u8"),
+        in, out);
+#endif
+  }
+#if 0
+  {
+    unsigned char in[][4]  = {{0,0,0,255},{140,0,0,255},{0,127,0,255}};
+    unsigned char out[][1] = {{        0},{          1},{          2}};
+
+    CHECK_CONV("rgba to pal", unsigned char,
+         babl_format("RGBA u8"), babl_new_palette ("palC", 0),
+         in, out);
+  }
+
+  {
+    unsigned char in[][4]  = {{0,0,0,255},{140,0,0,255},{0,127,0,127}};
+    unsigned char out[][2] = {{    0,255},{      1,255},{      2,127}};
+
+    CHECK_CONV("rgba to pal+alpha", unsigned char,
+         babl_format("RGBA u8"), babl_new_palette ("palD", 1),
+         in, out);
+  }
+
+  /* check with a custom floating point palette, _and_ alpha component  */
+  {
+    float palette[] = {
+      0.5,  1.0,
+      0.23, 0.42,
+      1.0,  0.2
+    };
+
+    unsigned char in[][2]   = {{          0,255},{0,127},{       1,255},{         2,255}};
+    unsigned char out[][4]  = {{128,128,128,255},{128,128,128,127},{59,59,59,107},{255,255,255,51}};
+
+    Babl *pal = babl_new_palette (NULL, 1);
+
+    babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3);
+
+    CHECK_CONV("rgba to YA float pal+alpha", unsigned char,
+         pal, babl_format("RGBA u8"),
+         in, out);
+  }
+
+
+  /* check with a custom floating point palette, _and_ alpha component  */
+  {
+    float palette[] = {
+      0.5,  1.0,
+      0.23, 0.42,
+      1.0,  0.2
+    };
+
+    unsigned char in[][2]   = {{          0,255},{0,127},{       1,255},{         2,255}};
+    unsigned char out[][4]  = {{128,128,128,255},{128,128,128,127},{59,59,59,107},{255,255,255,51}};
+
+    Babl *pal = babl_new_palette (NULL, 1);
+
+    babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3);
+
+    CHECK_CONV("rgba to YA float pal+alpha", unsigned char,
+         pal, babl_format("RGBA u8"),
+         in, out);
+  }
+
+  /* check with a custom floating point palette */
+  {
+    float palette[] = {
+      0.5,  1.0,
+      0.23, 0.42,
+      1.0,  0.2
+    };
+
+    unsigned char in[][1]   = {{              0},{          1},{          2}};
+    unsigned char out[][4]  = {{128,128,128,255},{59,59,59,107},{255,255,255,51}};
+
+    Babl *pal = babl_new_palette (NULL, 0);
+
+    babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3);
+
+    CHECK_CONV("rgba to float pal", unsigned char,
+         pal, babl_format("RGBA u8"),
+         in, out);
+  }
+#endif
+
+  babl_exit ();
+  return !OK;
+}
index 51986ee6a53f65c80e0d6bf6e0ac877f5036c19b..60fee1f24c590c880ceefc58f65f53fa90c14377 100644 (file)
@@ -39,7 +39,7 @@ unsigned char destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;
 
index 6efc79620a3e9e844251a8a3313ce810b409e994..49ddee37a77e6c6d54044fe5ec6cbeb599d78154 100644 (file)
@@ -46,7 +46,7 @@ float destination_buf [PIXELS * 3];
 static int
 test (void)
 {
-  Babl *fish;
+  const Babl *fish;
   int   i;
   int   OK = 1;